Sha256: 1812e337777854ce6b9b9e9df5c613b0798a29a68979614c0599a5d1bba5715f

Contents?: true

Size: 417 Bytes

Versions: 8

Compression:

Stored size: 417 Bytes

Contents

RSpec.describe Magick::Image, '#from_blob' do

  let(:img) { Magick::Image.read(IMAGES_DIR+'/Button_0.gif').first }
  let(:blob) { img.to_blob }

  it 'returns an image equal to the original' do
    expect(blob).to be_instance_of(String)
    res = Magick::Image.from_blob(blob)
    expect(res).to be_instance_of(Array)
    expect(res.first).to be_instance_of(Magick::Image)
    expect(res.first).to eq img
  end

end

Version data entries

8 entries across 8 versions & 3 rubygems

Version Path
rmagick-windows-2.16.5 spec/rmagick/image/from_blob_spec.rb
rmagick-windows-2.16.4 spec/rmagick/image/from_blob_spec.rb
rmagick-windows-2.16.3 spec/rmagick/image/from_blob_spec.rb
rmagick-windows-2.16.2 spec/rmagick/image/from_blob_spec.rb
rmagick-windows-2.16.1 spec/rmagick/image/from_blob_spec.rb
mdg-1.0.1 vendor/bundle/ruby/2.3.0/gems/rmagick-2.16.0/spec/rmagick/image/from_blob_spec.rb
rmagick-2.16.0 spec/rmagick/image/from_blob_spec.rb
rmagick-2.15.4 spec/rmagick/image/from_blob_spec.rb