1 require File.join(File.dirname(__FILE__), "helper")
5 I want to add people to the system
6 So that I show how many people use my system
7 }, :type => RailsStory do
8 Scenario "Successfully add person" do
9 Given "no people in the system" do
13 When "creating a new person named", "Dan" do |name|
14 post "people/create", :person => {:name => name}
17 Then "viewer should see", "people/list" do |template|
19 response.should render_template(template)
22 Then "list should include", "Dan" do |name|
23 response.should have_text(/#{name}/)
27 Scenario "Redirect to create form on failed create" do
28 Given "no people in the system" do
32 When "creating a new person with no name" do
33 # post "/people/create", :person => {:name => nil}
34 When "creating a new person named", nil
37 Then "viewer should see", "people/create" do |template|
38 assert_template template
41 Then "list should not include", "Dan" do |name|
42 response.should_not have_text(/#{name}/)
46 Scenario "This is supposed to come up as pending."