tests/test_tiff.rb in exifr-0.10.3 vs tests/test_tiff.rb in exifr-0.10.4

- old
+ new

@@ -114,11 +114,11 @@ def test_to_hash all_test_tiffs.each do |fname| t = TIFF.new(fname) TIFF::TAGS.each do |key| - assert_equal t.send(key), t.to_hash[key] + assert_literally_equal t.send(key), t.to_hash[key], "#{key} not equal" end end end def test_old_style @@ -131,9 +131,25 @@ require 'yaml' all_test_tiffs.each do |fname| t = TIFF.new(fname) y = YAML.dump(t) - assert_equal t.to_hash, YAML.load(y).to_hash + assert_literally_equal t.to_hash, YAML.load(y).to_hash end + end + + def test_jpeg_thumbnails + count = 0 + all_test_tiffs.each do |fname| + t = TIFF.new(fname) + unless t.jpeg_thumbnails.empty? + assert_nothing_raised do + t.jpeg_thumbnails.each do |n| + JPEG.new(StringIO.new(n)) + end + end + count += 1 + end + end + assert count > 0, 'no thumbnails found' end end \ No newline at end of file