Sha256: 89cc36d0fbcb6d8b4cca51d0cc30b1c0ef268b95f6a7c1936014e3359c5fef61

Contents?: true

Size: 694 Bytes

Versions: 21

Compression:

Stored size: 694 Bytes

Contents

require 'spec_helper'

describe ChunkyPNG::Canvas do

  describe '.from_rgb_stream' do
    it "should load an image correctly from a datastream" do
      File.open(resource_file('pixelstream.rgb')) do |stream|
        matrix = ChunkyPNG::Canvas.from_rgb_stream(240, 180, stream)
        matrix.should == reference_canvas('pixelstream_reference')
      end
    end
  end

  describe '.from_rgba_stream' do
    it "should load an image correctly from a datastream" do
      File.open(resource_file('pixelstream.rgba')) do |stream|
        matrix = ChunkyPNG::Canvas.from_rgba_stream(240, 180, stream)
        matrix.should == reference_canvas('pixelstream_reference')
      end
    end
  end
end

Version data entries

21 entries across 20 versions & 3 rubygems

Version Path
sadui-0.0.4 vendor/bundle/ruby/2.0.0/gems/chunky_png-1.3.0/spec/chunky_png/canvas/stream_importing_spec.rb
sadui-0.0.4 vendor/bundle/ruby/2.1.0/gems/chunky_png-1.3.0/spec/chunky_png/canvas/stream_importing_spec.rb
chunky_png-1.3.0 spec/chunky_png/canvas/stream_importing_spec.rb
chunky_png-1.2.9 spec/chunky_png/canvas/stream_importing_spec.rb
chunky_png-1.2.8 spec/chunky_png/canvas/stream_importing_spec.rb
chunky_png-1.2.7 spec/chunky_png/canvas/stream_importing_spec.rb
chunky_png-1.2.6 spec/chunky_png/canvas/stream_importing_spec.rb
radiant-1.0.0 ruby-debug/ruby/1.8/gems/chunky_png-1.2.5/spec/chunky_png/canvas/stream_importing_spec.rb
chunky_png-1.2.5 spec/chunky_png/canvas/stream_importing_spec.rb
chunky_png-1.2.4 spec/chunky_png/canvas/stream_importing_spec.rb
chunky_png-1.2.3 spec/chunky_png/canvas/stream_importing_spec.rb
chunky_png-1.2.2 spec/chunky_png/canvas/stream_importing_spec.rb
chunky_png-1.2.1 spec/chunky_png/canvas/stream_importing_spec.rb
chunky_png-1.2.0 spec/chunky_png/canvas/stream_importing_spec.rb
chunky_png-1.1.2 spec/chunky_png/canvas/stream_importing_spec.rb
chunky_png-1.1.1 spec/chunky_png/canvas/stream_importing_spec.rb
chunky_png-1.1.0 spec/chunky_png/canvas/stream_importing_spec.rb
chunky_png-1.0.1 spec/chunky_png/canvas/stream_importing_spec.rb
chunky_png-1.0.0 spec/chunky_png/canvas/stream_importing_spec.rb
chunky_png-1.0.0.rc2 spec/chunky_png/canvas/stream_importing_spec.rb