1
0
mirror of https://github.com/danbee/danbarberphoto synced 2025-03-04 08:49:07 +00:00
danbarberphoto/vendor/plugins/paperclip/features/step_definitions/html_steps.rb
2010-10-08 05:51:47 -04:00

15 lines
384 B
Ruby

Then %r{I should see an image with a path of "([^"]*)"} do |path|
page.should have_css("img[src^='#{path}']")
end
Then %r{^the file at "([^"]*)" is the same as "([^"]*)"$} do |web_file, path|
expected = IO.read(path)
actual = if web_file.match %r{^https?://}
Net::HTTP.get(URI.parse(web_file))
else
visit(web_file)
page.body
end
actual.should == expected
end