Sha256: 5c02da9e21741f2c47765432b02b49ada9d682494aabd6161f7520254f114b70

Contents?: true

Size: 734 Bytes

Versions: 1

Compression:

Stored size: 734 Bytes

Contents

require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')

describe "FedEx Service" do
  it "should not hit fedex until needed" do
    # If fedex was hit we would get an exception before the response is blank
    use_response(:blank)
    lambda { new_fedex.track(:tracking_number => fedex_tracking_number) }.should_not raise_error
  end
  
  it "should hit fedex when needed" do
    use_response(:blank)
    lambda { new_fedex.track(:tracking_number => fedex_tracking_number).size }.should raise_error(Shippinglogic::FedEx::Error)
  end
  
  it "should delegate the class method to the target" do
    use_response(:basic_track)
    new_fedex.track(:tracking_number => fedex_tracking_number).class.should == Array
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
binarylogic-shippinglogic-1.0.0 spec/fedex/service_spec.rb