spec/lib/fedex/document_spec.rb in fedex-3.6.1 vs spec/lib/fedex/document_spec.rb in fedex-3.8.0

- old
+ new

@@ -106,27 +106,27 @@ before do @document = fedex.document(options) end it "saves a label to file" do - File.should exist(filenames[:label]) + expect(File).to exist(filenames[:label]) end it "saves invoice to file" do - File.should exist(filenames[:commercial_invoice]) + expect(File).to exist(filenames[:commercial_invoice]) end it "returns tracking number" do - @document.should respond_to('tracking_number') + expect(@document).to respond_to('tracking_number') end it "exposes complete response" do - @document.should respond_to('response_details') + expect(@document).to respond_to('response_details') end it "exposes the filenames" do - @document.should respond_to('filenames') + expect(@document).to respond_to('filenames') end end context 'without document specification' do @@ -136,15 +136,15 @@ options.reject{|k| k == :shipping_document} ) end it "saves a label to file" do - File.should exist(filenames[:label]) + expect(File).to exist(filenames[:label]) end it "has no others files" do - File.should_not exist(filenames[:commercial_invoice]) + expect(File).not_to exist(filenames[:commercial_invoice]) end end context 'filename missed' do @@ -153,21 +153,21 @@ filenames.delete(:label) @document = fedex.document(options) end it "saves invoice to file" do - File.should exist(filenames[:commercial_invoice]) + expect(File).to exist(filenames[:commercial_invoice]) end end context 'for invoice' do before do filenames.delete(:commercial_invoice) @document = fedex.document(options) end it "saves label to file" do - File.should exist(filenames[:label]) + expect(File).to exist(filenames[:label]) end end end end