spec/exifr_jpeg_spec.rb in xmp-0.2.0 vs spec/exifr_jpeg_spec.rb in xmp-1.0.0

- old
+ new

@@ -1,13 +1,23 @@ require './spec/spec_helper.rb' +require 'exifr/jpeg' describe "XMP with EXIFR::JPEG" do - before do - XMP::Silencer.silently { @img = EXIFR::JPEG.new('spec/fixtures/multiple-app1.jpg') } + it "should parse image given as path" do + xmp = XMP.parse('spec/fixtures/multiple-app1.jpg') + xmp.should be_instance_of(XMP::Document) + xmp.namespaces.should =~ %w{dc iX pdf photoshop rdf tiff x xap xapRights} end - it "should parse image" do - xmp = XMP.parse(@img) - xmp.should be_instance_of(XMP) + it "should parse image given as path with upper case extension" do + xmp = XMP.parse('spec/fixtures/UPPERCASE.JPG') + xmp.should be_instance_of(XMP::Document) + xmp.namespaces.should =~ %w{dc iX pdf photoshop rdf tiff x xap xapRights} + end + + it "should parse image given as EXIFR::JPEG" do + img = EXIFR::JPEG.new('spec/fixtures/multiple-app1.jpg') + xmp = XMP.parse(img) + xmp.should be_instance_of(XMP::Document) xmp.namespaces.should =~ %w{dc iX pdf photoshop rdf tiff x xap xapRights} end end