steps
Ruby
code posted
created at 25 Aug 22:25
Edit
|
Back
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
steps_for(:visitor_contacts_xu) do Given "I am an anonymous visitor" do # no-op end When "I go to the contact form" do visits "/contact" # puts response.body end When "I submit the form with valid data" do fills_in 'Name', :with => 'Lance' fills_in 'Email', :with => 'lance@whatever.com' fills_in 'Phone', :with => '555-555-1212' fills_in 'Message', :with => 'I love XU' clicks_button "Submit" end When "I enter '$data' for $field" do |data, field| fills_in field, :with => data end When "I submit the form" do clicks_button "Submit" end Then /I should see '(.*)'/ do |text| response.should include_text(text) end end |
725 Bytes in 3 ms with coderay