features/support/image_thumbnails_steps.rb in middleman-simple-thumbnailer-1.0.1 vs features/support/image_thumbnails_steps.rb in middleman-simple-thumbnailer-1.0.2
- old
+ new
@@ -23,5 +23,14 @@
image10x10 = "<img class=\"image-resized-to10x10\" src=\"data:image/jpeg;base64,#{Base64.encode64(cached_10x10_data)}\" />"
image5x5 = "<img class=\"image-resized-to5x5\" src=\"data:image/jpeg;base64,#{Base64.encode64(cached_5x5_data)}\" />"
step %Q{I should see '#{image10x10}'}
step %Q{I should see '#{image5x5}'}
end
+
+Then(/^the following images should exist:$/) do |table|
+ table.hashes.each do |row|
+ in_current_dir do
+ image = MiniMagick::Image.open(row["filename"])
+ expect(image.dimensions).to eq row["dimensions"].split("x").map(&:to_i)
+ end
+ end
+end