Skip to content

Instantly share code, notes, and snippets.

@jedschneider
Created June 7, 2010 16:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jedschneider/428878 to your computer and use it in GitHub Desktop.
Save jedschneider/428878 to your computer and use it in GitHub Desktop.
# from http://github.com/dchelimsky/railsconf2010-app
Then /^I (should|should not) see the following cards in the "([^"]*)" swimlane:$/ do |see, swimlane_name, expected_cards|
swimlane = Swimlane.find_by_name(swimlane_name)
within("#swimlane-#{swimlane.id}") do
expected_cards.hashes.each do |row|
should_or_should_not = see.gsub(/ /, '_')
page.__send__(should_or_should_not, have_content(row["title"])) # Cleverness warning!
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment