Sha256: c19290d82ce3d1b1376f841ea35a8c3ebd6943989e1e8f4f963e02a036cab708

Contents?: true

Size: 653 Bytes

Versions: 5

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)
      expect(canvas).to eql 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"
      expect(canvas).to eql ChunkyPNG::Canvas.from_blob(image.to_blob)
    end
  end
rescue LoadError
  # skipping RMagick tests
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
chunky_png-1.4.0 spec/chunky_png/rmagick_spec.rb
chunky_png-1.3.15 spec/chunky_png/rmagick_spec.rb
chunky_png-1.3.14 spec/chunky_png/rmagick_spec.rb
chunky_png-1.3.13 spec/chunky_png/rmagick_spec.rb
chunky_png-1.3.12 spec/chunky_png/rmagick_spec.rb