Skip to content

Commit 9b506c1

Browse files
committed
First stab at forum listings.
You can see all three original subforums: Learning Ruby, Hackety Help, and Clubhouse.
1 parent cc774fe commit 9b506c1

4 files changed

Lines changed: 19 additions & 0 deletions

File tree

controllers/forums.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#you can view the forums at /forums
2+
get "/forums" do
3+
4+
#render that template!
5+
haml :"forums/index"
6+
end

features/forum.feature

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Feature: The Hackety Forum
2+
Scenario: View all forums
3+
Given I'm logged in
4+
When I go to the forums
5+
Then I should see "Learning Ruby"
6+
And I should see "Hackety Help"
7+
And I should see "Clubhouse"

features/support/paths.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ def path_to(page_name)
4444
"/programs/new"
4545
when /the "(.*)\/(.*)" program page/
4646
"/programs/#{$1}/#{$2}"
47+
when /the forums/
48+
"/forums"
4749

4850
# Add more mappings here.
4951
# Here is an example that pulls values out of the Regexp:

views/forums/index.haml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
%ul
2+
%li Learning Ruby
3+
%li Hackety Help
4+
%li Clubhouse

0 commit comments

Comments
 (0)