Skip to content

Instantly share code, notes, and snippets.

@craigw
Created July 3, 2009 13:05
Show Gist options
  • Save craigw/140093 to your computer and use it in GitHub Desktop.
Save craigw/140093 to your computer and use it in GitHub Desktop.
Testing for a thumbnail in a view
Then I should see the thumbnail "ponies.png"
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