<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -4,7 +4,7 @@ require 'rake/testtask'
 require &quot;rake/rdoctask&quot;
 require &quot;rake/gempackagetask&quot;  
 
-PRAWN_VERSION = &quot;0.5.0.1&quot; 
+PRAWN_VERSION = &quot;0.5.0.2&quot; 
 
 task :default =&gt; [:test]
        </diff>
      <filename>Rakefile</filename>
    </modified>
    <modified>
      <diff>@@ -4,7 +4,7 @@
 # Note that top level bounding boxes are positioned relative to the margin_box.
 #
 $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', '..', 'lib'))
-require 'prawn'
+require 'prawn/core'
 
 Prawn::Document.generate(&quot;left_padding.pdf&quot;) do
 </diff>
      <filename>examples/bounding_box/left_padding.rb</filename>
    </modified>
    <modified>
      <diff>@@ -8,7 +8,7 @@ require &quot;rake/gempackagetask&quot;
 
 spec = Gem::Specification.new do |spec|
   spec.name = &quot;prawn&quot;
-  spec.version = &quot;0.5.0.1&quot;
+  spec.version = &quot;0.5.0.2&quot;
   spec.platform = Gem::Platform::RUBY
   spec.summary = &quot;A fast and nimble PDF generator for Ruby&quot;
   spec.add_dependency('prawn-core', '~&gt; 0.5.0')</diff>
      <filename>meta/Rakefile</filename>
    </modified>
    <modified>
      <diff>@@ -128,6 +128,41 @@ describe &quot;drawing bounding boxes&quot; do
   
 end
 
+describe &quot;With left padding&quot; do
+  before(:each) { create_pdf }
+
+  it &quot;should temporarily shift the x coordinate and width&quot; do
+    @pdf.bounding_box([100,100], :width =&gt; 200) do
+      @pdf.pad_left(20) do
+        @pdf.bounds.absolute_left.should == 120
+        @pdf.bounds.width.should == 180
+      end
+    end
+  end
+
+  it &quot;should restore the x coordinate and width after block exits&quot; do
+    @pdf.bounding_box([100,100], :width =&gt; 200) do
+      @pdf.pad_left(20) do
+        # noop
+      end
+      @pdf.bounds.absolute_left.should == 100
+      @pdf.bounds.width.should == 200
+    end
+  end
+
+  it &quot;should restore the x coordinate and width on error&quot; do
+    @pdf.bounding_box([100,100], :width =&gt; 200) do
+      begin
+        @pdf.pad_left(20) { raise }
+      rescue
+        @pdf.bounds.absolute_left.should == 100
+        @pdf.bounds.width.should == 200
+      end
+    end
+  end
+
+end
+
 describe &quot;A canvas&quot; do
   before(:each) { create_pdf }
   </diff>
      <filename>spec/bounding_box_spec.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>5f606b3a95f7ad193aea87b2530820122bf5bdc9</id>
    </parent>
  </parents>
  <author>
    <name>Gregory Brown</name>
    <email>gregory.t.brown@gmail.com</email>
  </author>
  <url>http://github.com/sandal/prawn/commit/6224575e70e6f0bb24c6fccee5d66261fe807a60</url>
  <id>6224575e70e6f0bb24c6fccee5d66261fe807a60</id>
  <committed-date>2009-06-20T06:31:18-07:00</committed-date>
  <authored-date>2009-06-20T06:31:18-07:00</authored-date>
  <message>Some tests for jeremyf's pad_left</message>
  <tree>10a1cd59060a9c69b6da334796d1e2634c50bb15</tree>
  <committer>
    <name>Gregory Brown</name>
    <email>gregory.t.brown@gmail.com</email>
  </committer>
</commit>
