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 : Programs
2- Scenario : I can create new programs
3- Given I'm logged in as "steve"
4- When I go to the new program page
5- And I fill in "Title" with "Hello world"
6- And I fill in "Body" with "puts 'Hello, world!'"
7- And I press "Create"
8- Then I should be on the "steve/hello_world" program page.
9- And I should see "Program created"
10- And I should see "Hello world"
11- And I should see "By steve"
12- And I should see "puts"
132 Scenario : See programs on my page
143 Given I'm logged in as "steve"
154 And I have some programs
Original file line number Diff line number Diff line change 1+ require File . dirname ( __FILE__ ) + '/acceptance_helper'
2+
3+ feature "Programs" do
4+
5+ scenario "can be created" do
6+ @hacker = Factory ( :hacker )
7+ log_in @hacker
8+
9+ visit "/programs/new"
10+ fill_in "Title" , :with => "Hello world"
11+ fill_in "Body" , :with => "puts 'Hello, world!'"
12+ click_button "Create"
13+
14+ should_be_on "#{ @hacker . username } /hello_world"
15+
16+ page . should have_content "Program created"
17+ page . should have_content "Hello world"
18+ page . should have_content "By steve"
19+ page . should have_content "puts"
20+
21+ end
22+
23+ end
You can’t perform that action at this time.
0 commit comments