Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Use full list of params for blocks #77

Merged
merged 1 commit into from

2 participants

@BlakeMesdag
Collaborator

This uses a full set of params for the blocks being used to mock in tests which was causing test failures in 1.8.7.

Review

@daverooneyca

@daverooneyca

:ship: Thanks!

@BlakeMesdag BlakeMesdag merged commit b73e5ec into master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 20, 2013
  1. @BlakeMesdag
This page is out of date. Refresh to see the latest.
View
4 test/unit/carriers/canada_post_test.rb
@@ -94,7 +94,7 @@ 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
@@ -102,7 +102,7 @@ def test_turn_around_time_default
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)
Something went wrong with that request. Please try again.