Sha256: 3bdd72b514b2f339d172113c5d5f6d81737780d02dfb213a4f8d1287e02802bd
Contents?: true
Size: 599 Bytes
Versions: 15
Compression:
Stored size: 599 Bytes
Contents
require 'spec_helper' describe ChunkyPNG::Canvas do describe '#to_data_url' do it "should export a sample canvas to an RGBA stream correctly" do canvas = ChunkyPNG::Canvas.new(2, 2, [ChunkyPNG::Color.rgba(1,2,3,4), ChunkyPNG::Color.rgba(5,6,7,8), ChunkyPNG::Color.rgba(4,3,2,1), ChunkyPNG::Color.rgba(8,7,6,5)]) canvas.to_data_url.should == "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACAgMAAAAP2OW3AAAADFBMVEUBAgMEAwIFBgcIBwazgAAdAAAABHRSTlMEAQgFhYDlfQAAAAxJREFUeJxjUmAKAAAAwAB1GNhIEwAAAABJRU5ErkJggg==" end end end
Version data entries
15 entries across 14 versions & 4 rubygems