Created
February 25, 2009 13:38
-
-
Save robholland/70161 to your computer and use it in GitHub Desktop.
This file contains 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
Scenario: Check balance amounts | |
Given accounts like | |
| name | balance | | |
| Current | 5 | | |
| Savings | 10 | | |
When I visit the accounts page | |
Then the account list should look like | |
| name | balance | | |
| Current | 5.00 | | |
| Savings | 10.00 | | |
Then /the (.*) list should look like$/ do |type, table| | |
columns = table.raw[0] | |
response.body.should have_selector("##{type}_list") { |list| | |
table.hashes.each_with_index do |row, index| | |
list.should have_selector(".#{type}") { |item| | |
columns.each { |column| item.should have_selector("*[text()='#{row[column]}']")} | |
} | |
end | |
} | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment