Created
December 3, 2010 17:06
-
-
Save mattwynne/727229 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
#create_club.feature | |
Scenario: Admin adds a club with valid information | |
Given I am signed in as an admin with the email "[email protected]" | |
And the city "Barcelona" already exists | |
And I go to the new club page | |
When I fill in the following: | |
| Nombre | Ribelinos | | |
| Calle | Avda. Diagonal | | |
| Número | 661 | | |
| Teléfono | 934486875 | | |
And I select "Barcelona" from "Ciudad" | |
And I press "Guardar" | |
Then I should be on the clubs index page | |
And I should see all clubs information | |
#clubs.rb | |
Then /^I should see all clubs information$/ do | |
Club.all.each do |club| | |
Then "I should see #{club.name}" | |
And "I should see #{club.city}" | |
And "I should see #{club.city.country}" | |
And "I should see #{club.street}" | |
And "I should see #{club.number}" | |
And "I should see #{club.phone}" | |
end | |
end | |
#terminal output | |
Using the default profile... | |
.......-------...................U | |
4 scenarios (1 undefined, 3 passed) | |
29 steps (1 undefined, 28 passed) | |
0m1.848s | |
You can implement step definitions for undefined steps with these snippets: | |
Then /^I should see Ribelinos$/ do | |
pending # express the regexp above with the code you wish you had | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment