Sha256: ed0cbdfa94403d3e847d7a0897c241ee2a62a8dc665e1fac3a1dece36d63288f
Contents?: true
Size: 545 Bytes
Versions: 3
Compression:
Stored size: 545 Bytes
Contents
# Spec'ing the PNG class. Not complete yet - still needs to check the # contents of palette and transparency to ensure they're correct. # Need to find files that have these sections first. require 'spec_helper' describe Prawn::Images::JPG do let(:img_data) { File.binread("#{Prawn::DATADIR}/images/pigs.jpg") } it 'reads the basic attributes correctly' do jpg = described_class.new(img_data) expect(jpg.width).to eq(604) expect(jpg.height).to eq(453) expect(jpg.bits).to eq(8) expect(jpg.channels).to eq(3) end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
prawn-2.2.2 | spec/prawn/images/jpg_spec.rb |
prawn-2.2.1 | spec/prawn/images/jpg_spec.rb |
prawn-2.2.0 | spec/prawn/images/jpg_spec.rb |