Sha256: 3ca2aa20317fc1b079e3239725e66b6da214548772578506724efe57736db1f7

Contents?: true

Size: 536 Bytes

Versions: 15

Compression:

Stored size: 536 Bytes

Contents

require File.expand_path(File.dirname(__FILE__) + '/spec_helper')

each_sample("mouse*.bmp") do |fname|
  describe fname do
    subject(:bmp){ ZPNG::Image.load(fname) }
    let!(:png){ ZPNG::Image.load(fname.sub(".bmp",".png")) }

    its(:width ){ should == png.width }
    its(:height){ should == png.height }
    its(:format){ should == :bmp }

    it "should be equal to PNG" do
      bmp.should == png
    end

    it "should restore original imagedata" do
      File.binread(fname).should include(bmp.imagedata)
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
zpng-0.4.5 spec/bmp_spec.rb
zpng-0.4.4 spec/bmp_spec.rb
zpng-0.4.3 spec/bmp_spec.rb
zpng-0.4.2 spec/bmp_spec.rb
zpng-0.4.1 spec/bmp_spec.rb
zpng-0.4.0 spec/bmp_spec.rb
zpng-0.3.4 spec/bmp_spec.rb
zpng-0.3.3 spec/bmp_spec.rb
zpng-0.3.2 spec/bmp_spec.rb
zpng-0.3.1 spec/bmp_spec.rb
zpng-0.3.0 spec/bmp_spec.rb
zpng-0.2.5 spec/bmp_spec.rb
zpng-0.2.4 spec/bmp_spec.rb
zpng-0.2.3 spec/bmp_spec.rb
zpng-0.2.2 spec/bmp_spec.rb