Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
26 lines (18 sloc) 695 Bytes
# encoding: utf-8
# 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 File.join(File.expand_path(File.dirname(__FILE__)), "spec_helper")
describe "When reading a JPEG file" do
before(:each) do
@filename = "#{Prawn::BASEDIR}/data/images/pigs.jpg"
@img_data =, "rb") { |f| }
it "should read the basic attributes correctly" do
jpg =
jpg.width.should == 604
jpg.height.should == 453
jpg.bits.should == 8
jpg.channels.should == 3