features/support/image_thumbnails_steps.rb in middleman-simple-thumbnailer-1.2.0 vs features/support/image_thumbnails_steps.rb in middleman-simple-thumbnailer-1.2.1
- old
+ new
@@ -33,13 +33,13 @@
end
Then(/^the cache directory should exist (?:at "([^"]+)" )?with the following files$/) do |cache_dir, files|
cache_dir ||= MiddlemanSimpleThumbnailer::Extension.config.cache_dir
- check_directory_presence([cache_dir], true)
+ expect(cache_dir).to be_an_existing_directory
cd cache_dir
- files.raw.map{|file_row| file_row[0]}.each { |f| expect(f).to be_existing_file }
+ files.raw.map{|file_row| file_row[0]}.each { |f| expect(f).to be_an_existing_file }
end
Then(/^I should see base64ed data of the cached thumbnails with image path$/) do
# data that won't ever be generated by resizing an actual image
cached_10x10_data = "foo"
@@ -66,10 +66,10 @@
step %Q{I should see '#{cachedimage5x5}'}
end
Then(/^the following images should exist:$/) do |table|
table.hashes.each do |row|
- in_current_dir do
+ cd('.') do
image = MiniMagick::Image.open(row["filename"])
expect(image.dimensions).to eq row["dimensions"].split("x").map(&:to_i)
end
end
end