Sha256: a7fb9c11225a4d95c96da2eb9a5e730a1db5ce6abea9f83c59608779f5224e44

Contents?: true

Size: 653 Bytes

Versions: 29

Compression:

Stored size: 653 Bytes

Contents

require 'spec_helper'

begin
  require 'chunky_png/rmagick'

  describe ChunkyPNG::RMagick do
  
    it "should import an image from RMagick correctly" do
      image = Magick::Image.read(resource_file('composited.png')).first
      canvas = ChunkyPNG::RMagick.import(image)
      canvas.should == reference_canvas('composited')
    end
  
    it "should export an image to RMagick correctly" do
      canvas = reference_canvas('composited')
      image  = ChunkyPNG::RMagick.export(canvas)
      image.format = 'PNG32'
      canvas.should == ChunkyPNG::Canvas.from_blob(image.to_blob)
    end
  end
rescue LoadError => e
  # skipping RMagick tests
end

Version data entries

29 entries across 28 versions & 4 rubygems

Version Path
chunky_png-1.0.1 spec/chunky_png/rmagick_spec.rb
chunky_png-1.0.0 spec/chunky_png/rmagick_spec.rb
chunky_png-1.0.0.rc2 spec/chunky_png/rmagick_spec.rb
chunky_png-1.0.0.rc1 spec/chunky_png/rmagick_spec.rb
chunky_png-1.0.0.beta2 spec/chunky_png/rmagick_spec.rb
chunky_png-1.0.0.beta1 spec/chunky_png/rmagick_spec.rb
chunky_png-0.12.0 spec/chunky_png/rmagick_spec.rb
chunky_png-0.11.1 spec/chunky_png/rmagick_spec.rb
chunky_png-0.11.0 spec/chunky_png/rmagick_spec.rb