Sha256: 4755abe741aeca7389bd6fbe9693ff9e6f896ce93e1304544f353cd3170d43eb

Contents?: true

Size: 259 Bytes

Versions: 1

Compression:

Stored size: 259 Bytes

Contents

require "chunky_png"

RSpec::Matchers.define :be_a_valid_png do |expected|
  match do |actual|
    datastream = ChunkyPNG::Datastream.from_blob(actual)
    image = ChunkyPNG::Image.from_datastream(datastream)
    image.height > 0 && image.width > 0
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
bumpspark-2.0.0 spec/support/matchers/valid_png.rb