HEX
Server: Apache
System: Windows NT MAGNETO-ARM 10.0 build 22000 (Windows 10) AMD64
User: Michel (0)
PHP: 7.4.7
Disabled: NONE
Upload Files
File: C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/chunky_png-1.4.0/spec/chunky_png/rmagick_spec.rb
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