From 5b81654afc33b152b20ea3e2fb9b20a22beaecfc Mon Sep 17 00:00:00 2001 From: Donald Ball Date: Mon, 24 Nov 2008 20:15:39 -0600 Subject: [PATCH] broken test for not rezoomifying unnecessarily --- spec/zoomifier_spec.rb | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/spec/zoomifier_spec.rb b/spec/zoomifier_spec.rb index 587eaa8..3ff75bb 100644 --- a/spec/zoomifier_spec.rb +++ b/spec/zoomifier_spec.rb @@ -43,6 +43,24 @@ describe Zoomifier do image.columns.should <= 256 end end + + it "should not recreate the tiles if the image date precedes them" do + timestamps = {} + ['/ImageProperties.xml', '/TileGroup0/*.jpg'].each do |pattern| + Dir.glob(@output + pattern) do |filename| + timestamps[filename] = File.mtime(filename) + end + end + sleep(1) + Zoomifier::zoomify(@input) + new_timestamps = {} + ['/ImageProperties.xml', '/TileGroup0/*.jpg'].each do |pattern| + Dir.glob(@output + pattern) do |filename| + new_timestamps[filename] = File.mtime(filename) + end + end + timestamps.should == new_timestamps + end end describe "On a 2973x2159 JPEG file" do