Skip to content

Instantly share code, notes, and snippets.

@robholland
Created March 2, 2009 15:30
Show Gist options
  • Save robholland/72808 to your computer and use it in GitHub Desktop.
Save robholland/72808 to your computer and use it in GitHub Desktop.
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