Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

23 lines (18 sloc) 0.62 kb
require File.join(File.expand_path(File.dirname(__FILE__)), "spec_helper")
require "prawn/measurement_extensions"
describe "Measurement units" do
it "should convert units to PostScriptPoints" do
1.mm.should.be.close(2.834645669, 0.000000001)
1.mm.should == (72 / 25.4)
2.mm.should == (2 * 72 / 25.4)
3.mm.should == 3 * 72 / 25.4
-3.mm.should == -3 * 72/25.4
1.cm.should == 10 * 72 / 25.4
1.dm.should == 100 * 72 / 25.4
1.m.should == 1000 * 72 / 25.4
1.in.should == 72
1.ft.should == 72 * 12
1.yd.should == 72 * 12 * 3
1.pt.should == 1
end
end
Jump to Line
Something went wrong with that request. Please try again.