Sha256: 64bb9b81bee2c3f56d433aa5d62e03438c5a4301722c2b17c561797fce6dc085

Contents?: true

Size: 406 Bytes

Versions: 2

Compression:

Stored size: 406 Bytes

Contents

# encoding: utf-8     

require File.join(File.expand_path(File.dirname(__FILE__)), "spec_helper")  

describe "A bounding box" do

  before(:each) { create_pdf }
  
  it "should calculate a height if none is specified" do
    @pdf.bounding_box([100, 500], :width => 100) do
      @pdf.text "The rain in Spain falls mainly on the plains."
    end
    
    @pdf.y.should be_close(458.384, 0.001)
  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
prawn-0.1.0 spec/box_calculation_spec.rb
prawn-0.1.1 spec/box_calculation_spec.rb