Created
July 3, 2009 13:05
-
-
Save craigw/140093 to your computer and use it in GitHub Desktop.
Testing for a thumbnail in a view
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
Then I should see the thumbnail "ponies.png" |
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
Then /^I should see the thumbnail "([^\"]*)"$/ do |filename| | |
thumbnail = ::News::Thumbnail.find_by_filename!(filename) | |
response.should have_tag("img[src=?][class=thumbnail]", %r{#{thumbnail.public_filename + '?.*'}}) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment