spec/grid_spec.rb in prawn-0.14.0 vs spec/grid_spec.rb in prawn-0.15.0
- old
+ new
@@ -11,9 +11,20 @@
@pdf.grid.columns.should == 5
@pdf.grid.rows.should == 8
@pdf.grid.gutter.should == 0.1
end
+ it "should allow re-definition of a grid" do
+ @pdf.define_grid(:columns => 5, :rows => 8, :gutter => 0.1)
+ @pdf.grid.columns.should == 5
+ @pdf.grid.rows.should == 8
+ @pdf.grid.gutter.should == 0.1
+ @pdf.define_grid(:columns => 3, :rows => 6, :gutter => 0.1)
+ @pdf.grid.columns.should == 3
+ @pdf.grid.rows.should == 6
+ @pdf.grid.gutter.should == 0.1
+ end
+
describe "when a grid is defined" do
before do
@num_columns = 5
@num_rows = 8
@gutter = 10.0