Created
April 29, 2010 17:04
-
-
Save neaf/383891 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Given 'account with "$email" email does not exist' do |email| | |
| account = Account.where(:email => email).first | |
| account.delete unless account.nil? | |
| end | |
| Given 'I am not logged in' do | |
| visit "/logout" | |
| end | |
| When 'I go to registration form' do | |
| visit "/register" | |
| end | |
| When 'I fill in "$field" field with "$value"' do |field, value| | |
| fill_in field, :with => value | |
| end | |
| When 'I click "$button" button' do |button| | |
| click_button button | |
| end | |
| Then 'I should see "$button" message' do |message| | |
| page.should have_content(message) | |
| end | |
| Then 'I should see validation error(s)' do | |
| within("form") do | |
| page.should have_css("p.error") | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment