Sha256: 2be09950fa8bbbcd0a3a8b624b8c6c60c2d7e1796908e6c49d824172aad8ab64
Contents?: true
Size: 776 Bytes
Versions: 6
Compression:
Stored size: 776 Bytes
Contents
Given /^an album "(.+)" with attached file "(.+)"$/ do |name, filename| Album.create! :name => name, :cover_image => Rails.root.join('../../../samples', filename) end When /^I look at the generated image$/ do page.body =~ %r{src="(/media[^"]+?)"} url = $1 visit(url) end When /^I look at the original image$/ do page.body =~ %r{src="(/system[^"]+?)"} url = $1 visit(url) end Then /^I should see a (.+) image of size (.+)$/ do |format, size| tempfile = Tempfile.new('wicked') page.body.force_encoding('UTF-8').encode! if page.body.respond_to?(:force_encoding) # For some reason need this on Ruby 1.9.2 tempfile.write page.body tempfile.close output = `identify #{tempfile.path}`.split(' ') output[1].should == format output[2].should == size end
Version data entries
6 entries across 6 versions & 2 rubygems