<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -101,8 +101,8 @@ module Prawn
               end
             end
           else
-            string.unpack(&quot;U*&quot;).inject(0) do |s,r|
-              s + latin_glyphs_table[r]
+            string.unpack(&quot;U*&quot;).inject(0) do |s,r| 
+              s + latin_glyphs_table[r].to_i
             end * scale
           end
         end</diff>
      <filename>lib/prawn/font/metrics.rb</filename>
    </modified>
    <modified>
      <diff>@@ -11,7 +11,7 @@ describe &quot;A bounding box&quot; do
       @pdf.text &quot;The rain in Spain falls mainly on the plains.&quot;
     end
     
-    @pdf.y.should be_close(458.384, 0.001)
+    @pdf.y.should.be.close 458.384, 0.001 
   end
 
 end</diff>
      <filename>spec/box_calculation_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -49,7 +49,7 @@ describe &quot;When beginning each new page&quot; do
   it &quot;should execute the lambda specified by on_page_start&quot; do
     on_start = mock(&quot;page_start_proc&quot;)
 
-    on_start.should_receive(:[]).exactly(3).times
+    on_start.expects(:[]).times(3)
    
     pdf = Prawn::Document.new(:on_page_start =&gt; on_start)
     pdf.start_new_page 
@@ -65,7 +65,7 @@ describe &quot;When ending each page&quot; do
 
     on_end = mock(&quot;page_end_proc&quot;)
 
-    on_end.should_receive(:[]).exactly(3).times
+    on_end.expects(:[]).times(3)
 
     pdf = Prawn::Document.new(:on_page_stop =&gt; on_end)
     pdf.start_new_page
@@ -77,8 +77,8 @@ describe &quot;When ending each page&quot; do
 
     pdf = Prawn::Document.new(:compress =&gt; false)
     content_stub = pdf.ref({})
-    content_stub.stub!(:compress_stream).and_return(true)
-    content_stub.should_not_receive(:compress_stream)
+    content_stub.stubs(:compress_stream).returns(true)
+    content_stub.expects(:compress_stream).never
 
     pdf.instance_variable_set(&quot;@page_content&quot;, content_stub)
     pdf.text &quot;Hi There&quot; * 20
@@ -89,8 +89,8 @@ describe &quot;When ending each page&quot; do
 
     pdf = Prawn::Document.new(:compress =&gt; true)
     content_stub = pdf.ref({})
-    content_stub.stub!(:compress_stream).and_return(true)
-    content_stub.should_receive(:compress_stream).exactly(1).times
+    content_stub.stubs(:compress_stream).returns(true)
+    content_stub.expects(:compress_stream).once
 
     pdf.instance_variable_set(&quot;@page_content&quot;, content_stub)
     pdf.text &quot;Hi There&quot; * 20
@@ -156,8 +156,8 @@ describe &quot;The mask() feature&quot; do
     @pdf.mask(:y, :line_width) do
       @pdf.y = y + 1
       @pdf.line_width = line_width + 1
-      @pdf.y.should_not == y
-      @pdf.line_width.should_not == line_width
+      @pdf.y.should.not == y
+      @pdf.line_width.should.not == line_width
     end
     @pdf.y.should == y
     @pdf.line_width.should == line_width 
@@ -170,7 +170,7 @@ describe &quot;The render() feature&quot; do
       @pdf = Prawn::Document.new(:page_size =&gt; &quot;A4&quot;, :page_layout =&gt; :landscape)
       @pdf.line [100,100], [200,200]
       str = @pdf.render
-      str.encoding.to_s.should eql(&quot;ASCII-8BIT&quot;)
+      str.encoding.to_s.should == &quot;ASCII-8BIT&quot;
     end
   end
 end</diff>
      <filename>spec/document_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -230,21 +230,21 @@ describe &quot;When using painting shortcuts&quot; do
   before(:each) { create_pdf }
  
   it &quot;should convert stroke_some_method(args) into some_method(args); stroke&quot; do
-    @pdf.should_receive(:line_to).with([100,100])
-    @pdf.should_receive(:stroke)
+    @pdf.expects(:line_to).with([100,100])
+    @pdf.expects(:stroke)
     
     @pdf.stroke_line_to [100,100]
   end  
   
   it &quot;should convert fill_some_method(args) into some_method(args); fill&quot; do
-    @pdf.should_receive(:line_to).with([100,100]) 
-    @pdf.should_receive(:fill)
+    @pdf.expects(:line_to).with([100,100]) 
+    @pdf.expects(:fill)
     
     @pdf.fill_line_to [100,100]
   end
   
   it &quot;should not break method_missing&quot; do
     lambda { @pdf.i_have_a_pretty_girlfriend_named_jia }.
-      should raise_error(NoMethodError) 
+      should.raise(NoMethodError) 
   end
 end</diff>
      <filename>spec/graphics_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -33,10 +33,10 @@ describe &quot;the image() function&quot; do
     images = observer(ImageObserver)
 
     # there should be 2 images in the page resources
-    images.page_xobjects.first.size.should eql(2)
+    images.page_xobjects.first.size.should == 2
 
     # but only 1 image xobject
-    @output.scan(/\/Type \/XObject/).size.should eql(1)
+    @output.scan(/\/Type \/XObject/).size.should == 1
   end  
 end
 </diff>
      <filename>spec/images_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -16,10 +16,10 @@ describe &quot;When reading a JPEG file&quot; do
   it &quot;should read the basic attributes correctly&quot; do
     jpg = Prawn::Images::JPG.new(@img_data)
     
-    jpg.width.should eql(604)
-    jpg.height.should eql(453)
-    jpg.bits.should eql(8)
-    jpg.channels.should eql(3)
+    jpg.width.should == 604
+    jpg.height.should == 453
+    jpg.bits.should == 8
+    jpg.channels.should == 3
   end
 end
 </diff>
      <filename>spec/jpg_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -48,7 +48,7 @@ describe &quot;PDF Object Serialization&quot; do
  
   it &quot;should not convert a whitespace containing Ruby symbol to a PDF name&quot; do
     lambda { Prawn::PdfObject(:&quot;My Symbol With Spaces&quot;) }.
-      should raise_error(Prawn::Errors::FailedObjectConversion)
+      should.raise(Prawn::Errors::FailedObjectConversion)
   end    
   
   it &quot;should convert a Ruby array to PDF Array when inside a content stream&quot; do
@@ -91,7 +91,7 @@ describe &quot;PDF Object Serialization&quot; do
   
   it &quot;should not allow keys other than strings or symbols for PDF dicts&quot; do
     lambda { Prawn::PdfObject(:foo =&gt; :bar, :baz =&gt; :bang, 1 =&gt; 4) }.
-      should raise_error(Prawn::Errors::FailedObjectConversion) 
+      should.raise(Prawn::Errors::FailedObjectConversion) 
   end  
   
   it &quot;should convert a Prawn::Reference to a PDF indirect object reference&quot; do</diff>
      <filename>spec/pdf_object_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -17,19 +17,19 @@ describe &quot;When reading an RGB PNG file&quot; do
   it &quot;should read the attributes from the header chunk correctly&quot; do
     png = Prawn::Images::PNG.new(@img_data)
     
-    png.width.should eql(258)
-    png.height.should eql(105)
-    png.bits.should eql(8)
-    png.color_type.should eql(2)
-    png.compression_method.should eql(0)
-    png.filter_method.should eql(0)
-    png.interlace_method.should eql(0)
+    png.width.should == 258
+    png.height.should == 105
+    png.bits.should == 8
+    png.color_type.should == 2
+    png.compression_method.should == 0
+    png.filter_method.should == 0
+    png.interlace_method.should == 0
   end
 
   it &quot;should read the image data chunk correctly&quot; do
     png = Prawn::Images::PNG.new(@img_data)
     data = File.open(@data_filename, &quot;rb&quot;) { |f| f.read }
-    png.img_data.should eql(data)
+    png.img_data.should == data
   end  
 end
 </diff>
      <filename>spec/png_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -35,7 +35,8 @@ describe &quot;A Reference object&quot; do
     cref &lt;&lt; &quot;Hi There &quot; * 20
     cref.compress_stream
 
-    (cref.stream.size &lt; ref.stream.size).should be_true
-    cref.data[:Filter].should eql(:FlateDecode)
+    assert cref.stream.size &lt; ref.stream.size, 
+      &quot;compressed stream expected to be smaller than source but wasn't&quot;
+    cref.data[:Filter].should == :FlateDecode
   end
 end</diff>
      <filename>spec/reference_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -3,7 +3,8 @@
 puts &quot;Prawn specs: Running on Ruby Version: #{RUBY_VERSION}&quot;
 
 require &quot;rubygems&quot;
-require &quot;spec&quot;
+require &quot;test/spec&quot;                                                
+require &quot;mocha&quot;
 $LOAD_PATH &lt;&lt; File.join(File.dirname(__FILE__), '..', 'lib') 
 require &quot;prawn&quot;
 gem 'pdf-reader', &quot;&gt;=0.7.3&quot;</diff>
      <filename>spec/spec_helper.rb</filename>
    </modified>
    <modified>
      <diff>@@ -72,7 +72,7 @@ describe &quot;A table's width&quot; do
 
     font_height = pdf.font_metrics.font_height(12)
 
-    table_height.should be_close(num_rows*font_height + 2*vpad*num_rows + vpad, 0.001)
+    table_height.should.be.close(num_rows*font_height + 2*vpad*num_rows + vpad, 0.001)
   end
 
 end
@@ -139,7 +139,7 @@ describe &quot;A table's content&quot; do
       data = [[&quot;foo&quot;,&quot;bar&quot;],[&quot;baz&quot;,&quot;&quot;]]
       @pdf = Prawn::Document.new
       @pdf.table(data)
-    }.should_not raise_error
+    }.should.not.raise
   end
     
 end</diff>
      <filename>spec/table_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -71,12 +71,12 @@ describe &quot;when drawing text&quot; do
      position = @pdf.y
      @pdf.text &quot;Foo&quot;
 
-     @pdf.y.should be_close(position - @pdf.font_metrics.font_height(12),
+     @pdf.y.should.be.close(position - @pdf.font_metrics.font_height(12),
                             0.0001)
 
      position = @pdf.y
      @pdf.text &quot;Foo\nBar\nBaz&quot;
-     @pdf.y.should be_close(position - 3*@pdf.font_metrics.font_height(12),
+     @pdf.y.should.be.close(position - 3*@pdf.font_metrics.font_height(12),
                             0.0001)
    end
    
@@ -154,13 +154,13 @@ describe &quot;when drawing text&quot; do
      @pdf.text &quot;Blaz&quot;, :at =&gt; [150,150]
      text = observer(FontObserver)
 
-     text.page_fonts.size.should eql(2)
-     text.page_fonts[0][0].should eql(:Helvetica)
-     text.page_fonts[1][0].should eql(:Helvetica)
+     text.page_fonts.size.should  == 2
+     text.page_fonts[0][0].should == :Helvetica
+     text.page_fonts[1][0].should == :Helvetica
    end
    
    it &quot;should raise an exception when an unknown font is used&quot; do
-     lambda { @pdf.font &quot;Pao bu&quot; }.should raise_error(Prawn::Errors::UnknownFont)
+     lambda { @pdf.font &quot;Pao bu&quot; }.should.raise(Prawn::Errors::UnknownFont)
    end
 
    if &quot;spec&quot;.respond_to?(:encode!)
@@ -168,22 +168,22 @@ describe &quot;when drawing text&quot; do
      it &quot;should raise an exception when a utf-8 incompatible string is rendered&quot; do
        str = &quot;Blah \xDD&quot;
        str.force_encoding(&quot;ASCII-8BIT&quot;)
-       lambda { @pdf.text str }.should raise_error(Prawn::Errors::IncompatibleStringEncoding)
+       lambda { @pdf.text str }.should.raise(Prawn::Errors::IncompatibleStringEncoding)
      end
      it &quot;should not raise an exception when a shift-jis string is rendered&quot; do 
        datafile = &quot;#{Prawn::BASEDIR}/data/shift_jis_text.txt&quot;  
-       sjis_str = File.open(datafile, &quot;r:shift_jis&quot;) { |f| f.gets } 
-       lambda { @pdf.text sjis_str }.should_not raise_error(Prawn::Errors::IncompatibleStringEncoding)
+       sjis_str = File.open(datafile, &quot;r:shift_jis&quot;) { |f| f.gets }        
+       lambda { @pdf.text sjis_str }.should.not.raise(Prawn::Errors::IncompatibleStringEncoding)
      end
    else
      # Handle non utf-8 string encodings in a sane way on non-M17N aware VMs
      it &quot;should raise an exception when a corrupt utf-8 string is rendered&quot; do
        str = &quot;Blah \xDD&quot;
-       lambda { @pdf.text str }.should raise_error(Prawn::Errors::IncompatibleStringEncoding)
+       lambda { @pdf.text str }.should.raise(Prawn::Errors::IncompatibleStringEncoding)
      end
      it &quot;should raise an exception when a shift-jis string is rendered&quot; do
        sjis_str = File.read(&quot;#{Prawn::BASEDIR}/data/shift_jis_text.txt&quot;)
-       lambda { @pdf.text sjis_str }.should raise_error(Prawn::Errors::IncompatibleStringEncoding)
+       lambda { @pdf.text sjis_str }.should.raise(Prawn::Errors::IncompatibleStringEncoding)
      end
    end
 </diff>
      <filename>spec/text_spec.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>66fd2f19be6455199939d1b5db65fbcc7ea0c661</id>
    </parent>
  </parents>
  <author>
    <name>Gregory Brown</name>
    <email>gregory.t.brown@gmail.com</email>
  </author>
  <url>http://github.com/sandal/prawn/commit/e1dde4995687392bcf3c43c23e07a05abbc85644</url>
  <id>e1dde4995687392bcf3c43c23e07a05abbc85644</id>
  <committed-date>2008-08-07T10:19:29-07:00</committed-date>
  <authored-date>2008-08-07T10:13:05-07:00</authored-date>
  <message>Surprise!  Kids, you're going to need to learn test-spec and mocha.  If you hate this idea, we can head back to Test::Unit entirely, but I'm not going to be jimmied around by Ruby 1.9 incompatibilities in RSpec.  Alternative testing frameworks FTW</message>
  <tree>0cb8ba51e5e17c050b5ef43560b9574f077e4556</tree>
  <committer>
    <name>Gregory Brown</name>
    <email>gregory.t.brown@gmail.com</email>
  </committer>
</commit>
