Skip to content
Browse files

Use full list of params for blocks

  • Loading branch information...
1 parent 23d7d2d commit 275977be0b5b45c145e632c2eb0d6fc6496fbeee @BlakeMesdag BlakeMesdag committed Mar 20, 2013
Showing with 4 additions and 4 deletions.
  1. +2 −2 test/unit/carriers/canada_post_test.rb
  2. +2 −2 test/unit/carriers/fedex_test.rb
View
4 test/unit/carriers/canada_post_test.rb
@@ -94,15 +94,15 @@ def test_non_success_parse_rate_response
end
def test_turn_around_time_default
- @carrier.expects(:commit).with do |request|
+ @carrier.expects(:commit).with do |request, options|
parsed_request = Hash.from_xml(request)
parsed_request['eparcel']['ratesAndServicesRequest']['turnAroundTime'] == "24"
end
@carrier.find_rates(@origin, @destination, @line_items)
end
def test_turn_around_time
- @carrier.expects(:commit).with do |request|
+ @carrier.expects(:commit).with do |request, options|
parsed_request = Hash.from_xml(request)
parsed_request['eparcel']['ratesAndServicesRequest']['turnAroundTime'] == "0"
end
View
4 test/unit/carriers/fedex_test.rb
@@ -33,7 +33,7 @@ def test_turn_around_time_default
Timecop.freeze(today) do
delivery_date = Date.today + 7.days # FIVE_DAYS in fixture response, plus weekend
timestamp = Time.now.iso8601
- @carrier.expects(:commit).with do |request|
+ @carrier.expects(:commit).with do |request, options|
parsed_response = Hash.from_xml(request)
parsed_response['RateRequest']['RequestedShipment']['ShipTimestamp'] == timestamp
end.returns(mock_response)
@@ -49,7 +49,7 @@ def test_turn_around_time
Timecop.freeze(DateTime.new(2013, 3, 11)) do
delivery_date = Date.today + 8.days # FIVE_DAYS in fixture response, plus turn_around_time, plus weekend
timestamp = (Time.now + 1.day).iso8601
- @carrier.expects(:commit).with do |request|
+ @carrier.expects(:commit).with do |request, options|
parsed_response = Hash.from_xml(request)
parsed_response['RateRequest']['RequestedShipment']['ShipTimestamp'] == timestamp
end.returns(mock_response)

0 comments on commit 275977b

Please sign in to comment.
Something went wrong with that request. Please try again.