Skip to content

Commit 5a7052f

Browse files
committed
can view replies
1 parent 2e0db2e commit 5a7052f

2 files changed

Lines changed: 12 additions & 7 deletions

File tree

features/forum.feature

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,4 @@
11
Feature: The Hackety Forum
2-
Scenario: View replies to a discussion
3-
Given I'm logged in
4-
And there's a discussion named "I need help" in "learning_ruby" with a reply
5-
When I go to the discussion "i_need_help" in "learning_ruby"
6-
Then I should see "I need help"
7-
And I should see "I'm here to help!"
82
Scenario: Make a new reply
93
Given I'm logged in as "steve"
104
And there's a discussion named "I need help" in "learning_ruby" with a reply

spec/acceptance/forum_spec.rb

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,18 @@
2222

2323
visit "/forums"
2424
click_link "Learning Ruby"
25-
page.should have_content "I need help!"
25+
page.should have_content title
26+
end
27+
28+
scenario "view replies" do
29+
@hacker = Factory(:hacker)
30+
log_in @hacker
31+
32+
Factory(:discussion_with_reply, :title => "I need help", :forum => "learning_ruby")
33+
34+
visit "/forums/learning_ruby/i_need_help"
35+
page.should have_content "I need help"
36+
page.should have_content "I'm here to help!"
2637
end
2738

2839
end

0 commit comments

Comments
 (0)