spec/document_processor_spec.rb in postalmethods-1.0.0 vs spec/document_processor_spec.rb in postalmethods-1.0.1

- old
+ new

@@ -5,33 +5,33 @@ before :each do @client = PostalMethods::Client.new(PM_OPTS) end it "should open a valid pre-opened document" do - @client.document = open(File.dirname(__FILE__) + '/../doc/sample.pdf') + @client.document = open(File.dirname(__FILE__) + '/../spec/doc/sample.pdf') @client.document.class.should == Hash end it "should open a valid document path" do - @client.document = File.dirname(__FILE__) + '/../doc/sample.pdf' + @client.document = File.dirname(__FILE__) + '/../spec/doc/sample.pdf' @client.document.class.should == Hash end it "should create a hash with the right elements" do - @client.document = File.dirname(__FILE__) + '/../doc/sample.pdf' + @client.document = File.dirname(__FILE__) + '/../spec/doc/sample.pdf' @client.document[:extension].should == "pdf" @client.document[:bytes].length.should == 213312 @client.document[:name].should == "sample.pdf" @client.document[:file_obj].class.should == File end it "should return true on a valid document path" do - @client.document = File.dirname(__FILE__) + '/../doc/sample.pdf' + @client.document = File.dirname(__FILE__) + '/../spec/doc/sample.pdf' @client.document?.should == true end it "should throw an exception on a false path" do - @doc = File.dirname(__FILE__) + '/../doc/does_not_exist.pdf' + @doc = File.dirname(__FILE__) + '/../spec/doc/does_not_exist.pdf' lambda {@client.document = @doc}.should raise_error(Errno::ENOENT) end end