Sha256: 5c7d50623b7bfacbe9719c6220a157db2e6b95d2e679ae92617c9e848003c4d0
Contents?: true
Size: 513 Bytes
Versions: 16
Compression:
Stored size: 513 Bytes
Contents
When /^I look at the generated (.+) image$/ do |image_name| page.body =~ %r{src="(/media[^"]+?)"} 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
16 entries across 16 versions & 2 rubygems