Description: reflect the fact that spec/data moved to data/spec
 The specs use some (one) pdf files stored in spec/data. In order to test the
 library installed in debian/ruby-prawn/, these files are moved to data/spec, so
 that they can be installed too (see debian/ruby-prawn.install).
 The code of the specs has to be modified to find correctly the files which moved away.
Author: Cédric Boutillier <cedric.boutillier@gmail.com>
Last-Update: 2011-11-15

--- a/spec/object_store_spec.rb
+++ b/spec/object_store_spec.rb
@@ -16,20 +16,20 @@
   end
 
   it "should import objects from an existing PDF" do
-    filename = "#{Prawn::BASEDIR}/spec/data/curves.pdf"
+    filename = "#{Prawn::DATADIR}/spec/curves.pdf"
     store = Prawn::Core::ObjectStore.new(:template => filename)
     store.size.should == 5
   end
 
   it "should point to existing roots when importing objects from an existing PDF" do
-    filename = "#{Prawn::BASEDIR}/spec/data/curves.pdf"
+    filename = "#{Prawn::DATADIR}/spec/curves.pdf"
     store = Prawn::Core::ObjectStore.new(:template => filename)
     store.info.class.should == Prawn::Core::Reference
     store.root.class.should == Prawn::Core::Reference
   end
 
   it "should initialize with pages when importing objects from an existing PDF" do
-    filename = "#{Prawn::BASEDIR}/spec/data/curves.pdf"
+    filename = "#{Prawn::DATADIR}/spec/curves.pdf"
     store = Prawn::Core::ObjectStore.new(:template => filename)
     store.pages.data[:Count].should == 1
   end
--- a/spec/template_spec.rb
+++ b/spec/template_spec.rb
@@ -2,7 +2,7 @@
 
 describe "Document built from a template" do
   it "should have the same page count as the source document" do
-    filename = "#{Prawn::BASEDIR}/spec/data/curves.pdf"
+    filename = "#{Prawn::DATADIR}/spec/curves.pdf"
     @pdf = Prawn::Document.new(:template => filename)
     page_counter = PDF::Inspector::Page.analyze(@pdf.render)
 
@@ -10,14 +10,14 @@
   end
 
   it "should have start with the Y cursor at the top of the document" do
-    filename = "#{Prawn::BASEDIR}/spec/data/curves.pdf"
+    filename = "#{Prawn::DATADIR}/spec/curves.pdf"
 
     @pdf = Prawn::Document.new(:template => filename)
     (@pdf.y == nil).should == false
   end
 
   it "should respect margins set by Prawn" do
-    filename = "#{Prawn::BASEDIR}/spec/data/curves.pdf"
+    filename = "#{Prawn::DATADIR}/spec/curves.pdf"
 
     @pdf = Prawn::Document.new(:template => filename, :margin => 0)
     assert_equal @pdf.page.margins, { :left   => 0,
@@ -44,7 +44,7 @@
   end
 
   it "should not add an extra restore_graphics_state operator to the end of any content stream" do
-    filename = "#{Prawn::BASEDIR}/spec/data/curves.pdf"
+    filename = "#{Prawn::DATADIR}/spec/curves.pdf"
 
     @pdf = Prawn::Document.new(:template => filename)
     output = StringIO.new(@pdf.render)
@@ -165,7 +165,7 @@
 end
 
 describe "Document#start_new_page with :template option" do
-  filename = "#{Prawn::BASEDIR}/spec/data/curves.pdf"
+  filename = "#{Prawn::DATADIR}/spec/curves.pdf"
   
   it "should set the imported page's parent to the document pages catalog" do
     @pdf = Prawn::Document.new()
