Sha256: cc6d3bdd44b17525c4272cc1a28771b246a78a8eebf5325c22f627cc8e1dfc20

Contents?: true

Size: 658 Bytes

Versions: 5

Compression:

Stored size: 658 Bytes

Contents

require 'spec_helper'

describe ChunkyPNG::Canvas do
  
  describe '#to_rgba_stream' do
    before { File.open(resource_file('pixelstream.rgba'), 'rb') { |f| @reference_data = f.read } }
    
    it "should load an image correctly from a datastream" do
      reference_canvas('pixelstream_reference').to_rgba_stream.should == @reference_data
    end
  end

  describe '#to_rgb_stream' do
    before { File.open(resource_file('pixelstream.rgb'), 'rb') { |f| @reference_data = f.read } }
    
    it "should load an image correctly from a datastream" do
      reference_canvas('pixelstream_reference').to_rgb_stream.should == @reference_data
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
chunky_png-1.1.0 spec/chunky_png/canvas/stream_exporting_spec.rb
chunky_png-1.0.1 spec/chunky_png/canvas/stream_exporting_spec.rb
chunky_png-1.0.0 spec/chunky_png/canvas/stream_exporting_spec.rb
chunky_png-1.0.0.rc2 spec/chunky_png/canvas/stream_exporting_spec.rb
chunky_png-1.0.0.rc1 spec/chunky_png/canvas/stream_exporting_spec.rb