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 : Messages
2- Scenario : I can send a message
3- Given I'm logged in
4- And there's a hacker with the username "fela"
5- And I go to the hacker page for "fela"
6- When I follow "Send fela a message"
7- And I fill in "Message text" with "Hello, fela!"
8- And I press "Send message"
9- Then I should be on the hacker page for "fela"
10- And I should see "Message sent."
112 Scenario : I can't send a message when not logged in
123 Given I'm not logged in
134 And there's a hacker with the username "fela"
Original file line number Diff line number Diff line change 1+ require File . dirname ( __FILE__ ) + '/acceptance_helper'
2+
3+ feature "Messages" do
4+
5+ background do
6+ Pony . should_receive ( :deliver )
7+ end
8+
9+ scenario "can be sent" do
10+ @hacker = Factory ( :hacker )
11+ log_in @hacker
12+
13+ @fela = Factory ( :hacker , :username => "fela" )
14+
15+ visit "/hackers/fela"
16+
17+ click_link "Send fela a message"
18+ fill_in "Message text" , :with => "Hello, fela!"
19+
20+ click_button "Send message"
21+
22+ should_be_on "/hackers/fela"
23+ page . should have_content "Message sent."
24+ end
25+ end
You can’t perform that action at this time.
0 commit comments