Sha256: 85a0f02b08e9b7def6b23510d453118c599f01bb62e977bfeccd80511f14f9a5
Contents?: true
Size: 576 Bytes
Versions: 2
Compression:
Stored size: 576 Bytes
Contents
# frozen_string_literal: true # 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
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
prawn-2.4.0 | spec/prawn/images/jpg_spec.rb |
prawn-2.3.0 | spec/prawn/images/jpg_spec.rb |