File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11Feature : 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
Original file line number Diff line number Diff line change 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+
3954end
You can’t perform that action at this time.
0 commit comments