Skip to content

Commit 289c92a

Browse files
committed
creating replies
1 parent 5a7052f commit 289c92a

2 files changed

Lines changed: 15 additions & 13 deletions

File tree

features/forum.feature

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,4 @@
11
Feature: The Hackety Forum
2-
Scenario: Make a new reply
3-
Given I'm logged in as "steve"
4-
And there's a discussion named "I need help" in "learning_ruby" with a reply
5-
And I go to the forums
6-
And I follow "Learning Ruby"
7-
And I follow "I need help"
8-
When I follow "Reply"
9-
And I fill in "Body" with "I'll help you!"
10-
And I press "Create Reply"
11-
Then I should be on the discussion "i_need_help" in "learning_ruby"
12-
And I should see "Replied!"
13-
And I should see "I'll help you"
14-
And I should see "steve says:"
152
Scenario: Make a new discussion
163
Given I'm logged in as "some_hacker"
174
And I go to the forums

spec/acceptance/forum_spec.rb

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,19 @@
3636
page.should have_content "I'm here to help!"
3737
end
3838

39+
scenario "make a new reply" do
40+
@hacker = Factory(:hacker)
41+
log_in @hacker
42+
43+
Factory(:discussion_with_reply, :title => "I need help", :forum => "learning_ruby")
44+
visit "/forums/learning_ruby/i_need_help"
45+
click_link "Reply"
46+
fill_in "Body", :with => "I'll help you!"
47+
click_button "Create Reply"
48+
should_be_on "/forums/learning_ruby/i_need_help"
49+
page.should have_content "Replied!"
50+
page.should have_content "I'll help you"
51+
page.should have_content "steve says:"
52+
end
53+
3954
end

0 commit comments

Comments
 (0)