usps 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (39) hide show
  1. checksums.yaml +7 -0
  2. data/README.md +84 -0
  3. data/Rakefile +6 -8
  4. data/lib/usps.rb +6 -5
  5. data/lib/usps/address.rb +1 -1
  6. data/lib/usps/configuration.rb +1 -1
  7. data/lib/usps/request.rb +2 -1
  8. data/lib/usps/request/tracking_field_lookup.rb +28 -0
  9. data/lib/usps/response.rb +1 -0
  10. data/lib/usps/response/address_standardization.rb +15 -1
  11. data/lib/usps/response/city_and_state_lookup.rb +16 -2
  12. data/lib/usps/response/tracking_field_lookup.rb +34 -0
  13. data/lib/usps/response/tracking_lookup.rb +1 -1
  14. data/lib/usps/track_detail.rb +49 -0
  15. data/lib/usps/version.rb +1 -1
  16. data/spec/address_spec.rb +14 -14
  17. data/spec/configuration_spec.rb +4 -4
  18. data/spec/data/tracking_field_lookup.xml +41 -0
  19. data/spec/data/tracking_field_lookup_2.xml +17 -0
  20. data/spec/request/address_standardization_spec.rb +13 -13
  21. data/spec/request/base_spec.rb +2 -2
  22. data/spec/request/city_and_state_lookup_spec.rb +10 -10
  23. data/spec/request/delivery_confirmation_certify_spec.rb +3 -3
  24. data/spec/request/delivery_confirmation_spec.rb +27 -27
  25. data/spec/request/tracking_field_spec.rb +20 -0
  26. data/spec/request/tracking_spec.rb +5 -5
  27. data/spec/request/zip_code_lookup_spec.rb +11 -11
  28. data/spec/response/address_standardization_spec.rb +9 -9
  29. data/spec/response/city_and_state_lookup_spec.rb +6 -6
  30. data/spec/response/delivery_confirmation_spec.rb +19 -19
  31. data/spec/response/tracking_field_lookup_spec.rb +28 -0
  32. data/spec/response/tracking_lookup_spec.rb +10 -10
  33. data/spec/track_detail_spec.rb +51 -0
  34. data/spec/usps_spec.rb +1 -1
  35. metadata +66 -90
  36. data/README.rdoc +0 -60
  37. data/lib/usps/request/signature_confirmation.rb +0 -44
  38. data/spec/request/signature_confirmation_spec.rb +0 -0
  39. data/spec/response/signature_confirmation_spec.rb +0 -0
@@ -0,0 +1,17 @@
1
+ <?xml version="1.0"?>
2
+ <TrackResponse>
3
+ <TrackInfo ID="01805213907042762274">
4
+ <TrackSummary>
5
+ <EventTime></EventTime>
6
+ <EventDate></EventDate>
7
+ <Event>DELIVERED</Event>
8
+ <EventCity>NEWTON</EventCity>
9
+ <EventState>IA</EventState>
10
+ <EventZIPCode>50208</EventZIPCode>
11
+ <EventCountry/>
12
+ <FirmName></FirmName>
13
+ <Name></Name>
14
+ <AuthorizedAgent></AuthorizedAgent>
15
+ </TrackSummary>
16
+ </TrackInfo>
17
+ </TrackResponse>
@@ -3,16 +3,16 @@ require 'spec_helper'
3
3
  describe USPS::Request::AddressStandardization do
4
4
  it "should be using the proper USPS api settings" do
5
5
  USPS::Request::AddressStandardization.tap do |klass|
6
- klass.secure.should be_false
7
- klass.api.should == 'Verify'
8
- klass.tag.should == 'AddressValidateRequest'
6
+ expect(klass.secure).to be_falsey
7
+ expect(klass.api).to eq('Verify')
8
+ expect(klass.tag).to eq('AddressValidateRequest')
9
9
  end
10
10
  end
11
11
 
12
12
  it "should not allow more than 5 addresses" do
13
- Proc.new do
13
+ expect do
14
14
  USPS::Request::AddressStandardization.new([USPS::Address.new] * 6)
15
- end.should raise_exception(ArgumentError)
15
+ end.to raise_exception(ArgumentError)
16
16
  end
17
17
 
18
18
  it "should be able to build a proper request" do
@@ -31,15 +31,15 @@ describe USPS::Request::AddressStandardization do
31
31
  xml = Nokogiri::XML.parse(request.build)
32
32
 
33
33
  xml.search('Address').first.tap do |node|
34
- node.attr('ID').should == '0'
34
+ expect(node.attr('ID')).to eq('0')
35
35
 
36
- node.search('FirmName').text.should == 'Widget Tel Co.'
37
- node.search('Address1').text.should == 'Suite 2000'
38
- node.search('Address2').text.should == '999 Serious Business Av'
39
- node.search('City').text.should == 'Awesome Town'
40
- node.search('State').text.should == 'FL'
41
- node.search('Zip5').text.should == '12345'
42
- node.search('Zip4').text.should == '9900'
36
+ expect(node.search('FirmName').text).to eq('Widget Tel Co.')
37
+ expect(node.search('Address1').text).to eq('Suite 2000')
38
+ expect(node.search('Address2').text).to eq('999 Serious Business Av')
39
+ expect(node.search('City').text).to eq('Awesome Town')
40
+ expect(node.search('State').text).to eq('FL')
41
+ expect(node.search('Zip5').text).to eq('12345')
42
+ expect(node.search('Zip4').text).to eq('9900')
43
43
  end
44
44
  end
45
45
  end
@@ -10,7 +10,7 @@ describe USPS::Request::Base do
10
10
 
11
11
  xml = Nokogiri::XML.parse(sub.build)
12
12
 
13
- xml.root.name.should == 'TestingTag'
14
- xml.root.attr('USERID').should == USPS.username
13
+ expect(xml.root.name).to eq('TestingTag')
14
+ expect(xml.root.attr('USERID')).to eq(USPS.username)
15
15
  end
16
16
  end
@@ -3,16 +3,16 @@ require 'spec_helper'
3
3
  describe USPS::Request::CityAndStateLookup do
4
4
  it "should be using the proper USPS api settings" do
5
5
  USPS::Request::CityAndStateLookup.tap do |klass|
6
- klass.secure.should be_false
7
- klass.api.should == 'CityStateLookup'
8
- klass.tag.should == 'CityStateLookupRequest'
6
+ expect(klass.secure).to be_falsey
7
+ expect(klass.api).to eq('CityStateLookup')
8
+ expect(klass.tag).to eq('CityStateLookupRequest')
9
9
  end
10
10
  end
11
11
 
12
12
  it "should not allow more than 5 addresses" do
13
- Proc.new do
13
+ expect do
14
14
  USPS::Request::CityAndStateLookup.new([12345] * 10)
15
- end.should raise_exception(ArgumentError)
15
+ end.to raise_exception(ArgumentError)
16
16
  end
17
17
 
18
18
  it "should be able to build a proper request" do
@@ -23,10 +23,10 @@ describe USPS::Request::CityAndStateLookup do
23
23
  xml = Nokogiri::XML.parse(request.build)
24
24
 
25
25
  #
26
- xml.search('ZipCode[@ID="0"]/Zip5').text.should == '90210'
27
- xml.search('ZipCode[@ID="1"]/Zip5').text.should == '48917'
28
- xml.search('ZipCode[@ID="2"]/Zip5').text.should == '49423'
29
- xml.search('ZipCode[@ID="3"]/Zip5').text.should == '99111'
30
- xml.search('ZipCode[@ID="4"]/Zip5').text.should == '12345'
26
+ expect(xml.search('ZipCode[@ID="0"]/Zip5').text).to eq('90210')
27
+ expect(xml.search('ZipCode[@ID="1"]/Zip5').text).to eq('48917')
28
+ expect(xml.search('ZipCode[@ID="2"]/Zip5').text).to eq('49423')
29
+ expect(xml.search('ZipCode[@ID="3"]/Zip5').text).to eq('99111')
30
+ expect(xml.search('ZipCode[@ID="4"]/Zip5').text).to eq('12345')
31
31
  end
32
32
  end
@@ -3,9 +3,9 @@ require 'spec_helper'
3
3
  describe USPS::Request::DeliveryConfirmationCertify do
4
4
  it 'should be using the proper USPS api settings' do
5
5
  USPS::Request::DeliveryConfirmationCertify.tap do |klass|
6
- klass.secure.should be_true
7
- klass.api.should == 'DelivConfirmCertifyV3'
8
- klass.tag.should == 'DelivConfirmCertifyV3.0Request'
6
+ expect(klass.secure).to be_truthy
7
+ expect(klass.api).to eq('DelivConfirmCertifyV3')
8
+ expect(klass.tag).to eq('DelivConfirmCertifyV3.0Request')
9
9
  end
10
10
  end
11
11
  end
@@ -3,9 +3,9 @@ require 'spec_helper'
3
3
  describe USPS::Request::DeliveryConfirmation do
4
4
  it 'should be using the proper USPS api settings' do
5
5
  USPS::Request::DeliveryConfirmation.tap do |klass|
6
- klass.secure.should be_true
7
- klass.api.should == 'DeliveryConfirmationV3'
8
- klass.tag.should == 'DeliveryConfirmationV3.0Request'
6
+ expect(klass.secure).to be_truthy
7
+ expect(klass.api).to eq('DeliveryConfirmationV3')
8
+ expect(klass.tag).to eq('DeliveryConfirmationV3.0Request')
9
9
  end
10
10
  end
11
11
 
@@ -29,29 +29,29 @@ describe USPS::Request::DeliveryConfirmation do
29
29
  request = USPS::Request::DeliveryConfirmation.new(to, from, 2).build
30
30
 
31
31
  xml = Nokogiri::XML.parse(request)
32
- xml.search('Option').text.should == '1'
33
- xml.search('ImageParameters').text.should == ''
34
-
35
- xml.search('FromName').text.should == 'John Smith'
36
- xml.search('FromFirm').text.should == ''
37
- xml.search('FromAddress1').text.should == ''
38
- xml.search('FromAddress2').text.should == "475 L'Enfant Plaza, SW"
39
- xml.search('FromCity').text.should == 'Washington'
40
- xml.search('FromState').text.should == 'DC'
41
- xml.search('FromZip5').text.should == '20260'
42
- xml.search('FromZip4').text.should == ''
43
-
44
- xml.search('ToName').text.should == 'Joe Customer'
45
- xml.search('ToFirm').text.should == ''
46
- xml.search('ToAddress1').text.should == 'STE 201'
47
- xml.search('ToAddress2').text.should == '6060 PRIMACY PKWY'
48
- xml.search('ToCity').text.should == 'MEMPHIS'
49
- xml.search('ToState').text.should == 'TN'
50
- xml.search('ToZip5').text.should == ''
51
- xml.search('ToZip4').text.should == ''
52
-
53
- xml.search('WeightInOunces').text.should == '2'
54
- xml.search('ImageType').text.should == 'TIF'
55
- xml.search('ServiceType').text.should == 'Priority'
32
+ expect(xml.search('Option').text).to eq('1')
33
+ expect(xml.search('ImageParameters').text).to eq('')
34
+
35
+ expect(xml.search('FromName').text).to eq('John Smith')
36
+ expect(xml.search('FromFirm').text).to eq('')
37
+ expect(xml.search('FromAddress1').text).to eq('')
38
+ expect(xml.search('FromAddress2').text).to eq("475 L'Enfant Plaza, SW")
39
+ expect(xml.search('FromCity').text).to eq('Washington')
40
+ expect(xml.search('FromState').text).to eq('DC')
41
+ expect(xml.search('FromZip5').text).to eq('20260')
42
+ expect(xml.search('FromZip4').text).to eq('')
43
+
44
+ expect(xml.search('ToName').text).to eq('Joe Customer')
45
+ expect(xml.search('ToFirm').text).to eq('')
46
+ expect(xml.search('ToAddress1').text).to eq('STE 201')
47
+ expect(xml.search('ToAddress2').text).to eq('6060 PRIMACY PKWY')
48
+ expect(xml.search('ToCity').text).to eq('MEMPHIS')
49
+ expect(xml.search('ToState').text).to eq('TN')
50
+ expect(xml.search('ToZip5').text).to eq('')
51
+ expect(xml.search('ToZip4').text).to eq('')
52
+
53
+ expect(xml.search('WeightInOunces').text).to eq('2')
54
+ expect(xml.search('ImageType').text).to eq('TIF')
55
+ expect(xml.search('ServiceType').text).to eq('Priority')
56
56
  end
57
57
  end
@@ -0,0 +1,20 @@
1
+ require 'spec_helper'
2
+
3
+ describe USPS::Request::TrackingFieldLookup do
4
+
5
+ it 'should be using the proper USPS api settings' do
6
+ USPS::Request::TrackingFieldLookup.tap do |klass|
7
+ expect(klass.secure).to be_falsey
8
+ expect(klass.api).to eq('TrackV2')
9
+ expect(klass.tag).to eq('TrackFieldRequest')
10
+ end
11
+ end
12
+
13
+ it "should build a proper request" do
14
+ request = USPS::Request::TrackingFieldLookup.new("EJ958083578US").build
15
+ xml = Nokogiri::XML.parse(request)
16
+ expect(xml.search('TrackID').text).to eq('')
17
+ expect(xml.search('TrackID').attr("ID").text).to eq("EJ958083578US")
18
+ end
19
+
20
+ end
@@ -4,9 +4,9 @@ describe USPS::Request::TrackingLookup do
4
4
 
5
5
  it 'should be using the proper USPS api settings' do
6
6
  USPS::Request::TrackingLookup.tap do |klass|
7
- klass.secure.should be_false
8
- klass.api.should == 'TrackV2'
9
- klass.tag.should == 'TrackRequest'
7
+ expect(klass.secure).to be_falsey
8
+ expect(klass.api).to eq('TrackV2')
9
+ expect(klass.tag).to eq('TrackRequest')
10
10
  end
11
11
  end
12
12
 
@@ -14,8 +14,8 @@ describe USPS::Request::TrackingLookup do
14
14
  request = USPS::Request::TrackingLookup.new("EJ958083578US").build
15
15
 
16
16
  xml = Nokogiri::XML.parse(request)
17
- xml.search('TrackID').text.should == ''
18
- xml.search('TrackID').attr("ID").text.should == "EJ958083578US"
17
+ expect(xml.search('TrackID').text).to eq('')
18
+ expect(xml.search('TrackID').attr("ID").text).to eq("EJ958083578US")
19
19
  end
20
20
 
21
21
  end
@@ -3,16 +3,16 @@ require 'spec_helper'
3
3
  describe USPS::Request::ZipCodeLookup do
4
4
  it "should be using the proper USPS api settings" do
5
5
  USPS::Request::ZipCodeLookup.tap do |klass|
6
- klass.secure.should be_false
7
- klass.api.should == 'ZipCodeLookup'
8
- klass.tag.should == 'ZipCodeLookupRequest'
6
+ expect(klass.secure).to be_falsey
7
+ expect(klass.api).to eq('ZipCodeLookup')
8
+ expect(klass.tag).to eq('ZipCodeLookupRequest')
9
9
  end
10
10
  end
11
11
 
12
12
  it "should not allow more than 5 addresses" do
13
- Proc.new do
13
+ expect do
14
14
  USPS::Request::AddressStandardization.new([USPS::Address.new] * 6)
15
- end.should raise_exception(ArgumentError)
15
+ end.to raise_exception(ArgumentError)
16
16
  end
17
17
 
18
18
  it "should be able to build a proper request" do
@@ -30,13 +30,13 @@ describe USPS::Request::ZipCodeLookup do
30
30
  xml = Nokogiri::XML.parse(request.build)
31
31
 
32
32
  xml.search('Address').first.tap do |node|
33
- node.attr('ID').should == '0'
33
+ expect(node.attr('ID')).to eq('0')
34
34
 
35
- node.search('FirmName').text.should == 'Widget Tel Co.'
36
- node.search('Address1').text.should == 'Suite 2000'
37
- node.search('Address2').text.should == '999 Serious Business Av'
38
- node.search('City').text.should == 'Awesome Town'
39
- node.search('State').text.should == 'FL'
35
+ expect(node.search('FirmName').text).to eq('Widget Tel Co.')
36
+ expect(node.search('Address1').text).to eq('Suite 2000')
37
+ expect(node.search('Address2').text).to eq('999 Serious Business Av')
38
+ expect(node.search('City').text).to eq('Awesome Town')
39
+ expect(node.search('State').text).to eq('FL')
40
40
  end
41
41
  end
42
42
  end
@@ -14,10 +14,10 @@ describe USPS::Response::AddressStandardization do
14
14
 
15
15
  standard = response.get(address)
16
16
 
17
- standard.address.should == '6406 IVY LN'
18
- standard.city.should == 'GREENBELT'
19
- standard.state.should == 'MD'
20
- standard.zip.should == '20770-1441'
17
+ expect(standard.address).to eq('6406 IVY LN')
18
+ expect(standard.city).to eq('GREENBELT')
19
+ expect(standard.state).to eq('MD')
20
+ expect(standard.zip).to eq('20770-1441')
21
21
  end
22
22
 
23
23
  it "should handle test request 2" do
@@ -34,10 +34,10 @@ describe USPS::Response::AddressStandardization do
34
34
 
35
35
  standard = response.get(address)
36
36
 
37
- standard.address.should == '8 WILDWOOD DR'
38
- standard.city.should == 'OLD LYME'
39
- standard.state.should == 'CT'
40
- standard.zip.should == '06371-1844'
37
+ expect(standard.address).to eq('8 WILDWOOD DR')
38
+ expect(standard.city).to eq('OLD LYME')
39
+ expect(standard.state).to eq('CT')
40
+ expect(standard.zip).to eq('06371-1844')
41
41
  end
42
42
 
43
43
  it "should propogate name to the result address as it is not returned from api" do
@@ -49,6 +49,6 @@ describe USPS::Response::AddressStandardization do
49
49
  address, load_xml('address_standardization_2.xml')
50
50
  )
51
51
 
52
- response.get(address).name.should == 'Carl Sagan'
52
+ expect(response.get(address).name).to eq('Carl Sagan')
53
53
  end
54
54
  end
@@ -7,9 +7,9 @@ describe USPS::Response::CityAndStateLookup do
7
7
  )
8
8
 
9
9
  response.get(90210).tap do |r|
10
- r.zip.should == 90210
11
- r.city.should == 'BEVERLY HILLS'
12
- r.state.should == 'CA'
10
+ expect(r.zip).to eq(90210)
11
+ expect(r.city).to eq('BEVERLY HILLS')
12
+ expect(r.state).to eq('CA')
13
13
  end
14
14
  end
15
15
 
@@ -19,9 +19,9 @@ describe USPS::Response::CityAndStateLookup do
19
19
  )
20
20
 
21
21
  response.get(20770).tap do |r|
22
- r.zip.should == 20770
23
- r.city.should == 'GREENBELT'
24
- r.state.should == 'MD'
22
+ expect(r.zip).to eq(20770)
23
+ expect(r.city).to eq('GREENBELT')
24
+ expect(r.state).to eq('MD')
25
25
  end
26
26
  end
27
27
  end
@@ -6,18 +6,18 @@ describe USPS::Response::DeliveryConfirmation do
6
6
  load_xml('delivery_confirmation_1.xml')
7
7
  )
8
8
 
9
- response.confirmation.should == '420381199101805213907126809651'
10
- response.label.should == 'LABEL DATA GOES HERE'
11
- response.postnet.should == '38119571851'
9
+ expect(response.confirmation).to eq('420381199101805213907126809651')
10
+ expect(response.label).to eq('LABEL DATA GOES HERE')
11
+ expect(response.postnet).to eq('38119571851')
12
12
 
13
13
  # Check the address
14
14
  addy = response.address
15
- addy.name.should == 'Joe Customer'
16
- addy.address.should == '6060 PRIMACY PKWY'
17
- addy.address2.should == 'STE 201'
18
- addy.city.should == 'Memphis'
19
- addy.state.should == 'TN'
20
- addy.zip.should == '38119-5718'
15
+ expect(addy.name).to eq('Joe Customer')
16
+ expect(addy.address).to eq('6060 PRIMACY PKWY')
17
+ expect(addy.address2).to eq('STE 201')
18
+ expect(addy.city).to eq('Memphis')
19
+ expect(addy.state).to eq('TN')
20
+ expect(addy.zip).to eq('38119-5718')
21
21
  end
22
22
 
23
23
  # TODO: Test is still missing custom fields
@@ -26,18 +26,18 @@ describe USPS::Response::DeliveryConfirmation do
26
26
  load_xml('delivery_confirmation_2.xml')
27
27
  )
28
28
 
29
- response.confirmation.should == '420381199101805213907116323891'
30
- response.label.should == 'LABEL DATA GOES HERE'
31
- response.postnet.should == '38119571851'
29
+ expect(response.confirmation).to eq('420381199101805213907116323891')
30
+ expect(response.label).to eq('LABEL DATA GOES HERE')
31
+ expect(response.postnet).to eq('38119571851')
32
32
 
33
33
  # Check the address
34
34
  addy = response.address
35
- addy.company.should == 'U.S. Postal Service NCSC'
36
- addy.name.should == 'Joe Customer'
37
- addy.address.should == '6060 PRIMACY PKWY'
38
- addy.address2.should == 'STE 201'
39
- addy.city.should == 'MEMPHIS'
40
- addy.state.should == 'TN'
41
- addy.zip.should == '38119-5718'
35
+ expect(addy.company).to eq('U.S. Postal Service NCSC')
36
+ expect(addy.name).to eq('Joe Customer')
37
+ expect(addy.address).to eq('6060 PRIMACY PKWY')
38
+ expect(addy.address2).to eq('STE 201')
39
+ expect(addy.city).to eq('MEMPHIS')
40
+ expect(addy.state).to eq('TN')
41
+ expect(addy.zip).to eq('38119-5718')
42
42
  end
43
43
  end
@@ -0,0 +1,28 @@
1
+ require 'spec_helper'
2
+
3
+ describe USPS::Response::TrackingFieldLookup do
4
+
5
+ it "should handle test request" do
6
+ response = USPS::Response::TrackingFieldLookup.new(load_xml("tracking_field_lookup.xml"))
7
+ expect(response).to be_a_kind_of(USPS::Response::TrackingFieldLookup)
8
+
9
+ expect(response.summary.event).to eq("DELIVERED")
10
+ expect(response.summary.city).to eq("NEWTON")
11
+ expect(response.summary.date).to eq(Time.parse("2001-05-21 12:12:00 -0400"))
12
+ expect(response.summary.event_time).to eq("12:12 pm")
13
+ expect(response.summary.event_date).to eq("May 21, 2001")
14
+ expect(response.summary.event_state).to eq("IA")
15
+ expect(response.summary.event_zip_code).to eq("50208")
16
+ expect(response.summary.name).to eq("")
17
+ expect(response.summary.firm_name).to eq("")
18
+ expect(response.summary.authorized_agent).to eq("")
19
+
20
+ expect(response.details.length).to eq(2)
21
+ expect(response.details[0].event).to eq("ENROUTE")
22
+ expect(response.details[1].event).to eq("ACCEPTANCE")
23
+ end
24
+ it "should handle no detail records" do
25
+ response = USPS::Response::TrackingFieldLookup.new(load_xml("tracking_field_lookup_2.xml"))
26
+ expect(response.details.length).to eq(0)
27
+ end
28
+ end
@@ -5,23 +5,23 @@ describe USPS::Response::TrackingLookup do
5
5
  it "should handle test request 1" do
6
6
  response = USPS::Response::TrackingLookup.new(load_xml("tracking_lookup_1.xml"))
7
7
 
8
- response.summary.should == "Your item was delivered at 8:10 am on June 1 in Wilmington DE 19801."
9
- response.details.length.should == 3
8
+ expect(response.summary).to eq("Your item was delivered at 8:10 am on June 1 in Wilmington DE 19801.")
9
+ expect(response.details.length).to eq(3)
10
10
 
11
- response.details[0].should == "May 30 11:07 am NOTICE LEFT WILMINGTON DE 19801."
12
- response.details[1].should == "May 30 10:08 am ARRIVAL AT UNIT WILMINGTON DE 19850."
13
- response.details[2].should == "May 29 9:55 am ACCEPT OR PICKUP EDGEWATER NJ 07020."
11
+ expect(response.details[0]).to eq("May 30 11:07 am NOTICE LEFT WILMINGTON DE 19801.")
12
+ expect(response.details[1]).to eq("May 30 10:08 am ARRIVAL AT UNIT WILMINGTON DE 19850.")
13
+ expect(response.details[2]).to eq("May 29 9:55 am ACCEPT OR PICKUP EDGEWATER NJ 07020.")
14
14
  end
15
15
 
16
16
  it "should handle test request 2" do
17
17
  response = USPS::Response::TrackingLookup.new(load_xml("tracking_lookup_2.xml"))
18
18
 
19
- response.summary.should == "Your item was delivered at 1:39 pm on June 1 in WOBURN MA 01815."
20
- response.details.length.should == 3
19
+ expect(response.summary).to eq("Your item was delivered at 1:39 pm on June 1 in WOBURN MA 01815.")
20
+ expect(response.details.length).to eq(3)
21
21
 
22
- response.details[0].should == "May 30 7:44 am NOTICE LEFT WOBURN MA 01815."
23
- response.details[1].should == "May 30 7:36 am ARRIVAL AT UNIT NORTH READING MA 01889."
24
- response.details[2].should == "May 29 6:00 pm ACCEPT OR PICKUP PORTSMOUTH NH 03801."
22
+ expect(response.details[0]).to eq("May 30 7:44 am NOTICE LEFT WOBURN MA 01815.")
23
+ expect(response.details[1]).to eq("May 30 7:36 am ARRIVAL AT UNIT NORTH READING MA 01889.")
24
+ expect(response.details[2]).to eq("May 29 6:00 pm ACCEPT OR PICKUP PORTSMOUTH NH 03801.")
25
25
  end
26
26
 
27
27
  end