Update webmock dependency to version 1.14.0

This commit is contained in:
Erik Michaels-Ober 2013-10-03 10:52:03 +02:00
parent 0f6f61108b
commit 2812bc8734
3 changed files with 5 additions and 1 deletions

View File

@ -173,7 +173,7 @@ GEM
activemodel (~> 3.0) activemodel (~> 3.0)
warden (1.2.3) warden (1.2.3)
rack (>= 1.0) rack (>= 1.0)
webmock (1.13.0) webmock (1.14.0)
addressable (>= 2.2.7) addressable (>= 2.2.7)
crack (>= 0.3.2) crack (>= 0.3.2)

1
test/fixtures/unknown_address.txt vendored Normal file
View File

@ -0,0 +1 @@
2: couldn't find this address! sorry

View File

@ -10,6 +10,9 @@ class AddressesControllerTest < ActionController::TestCase
end end
test 'should return an error for an invalid address' do test 'should return an error for an invalid address' do
stub_request(:get, "http://geocoder.us/service/csv/geocode").
with(:query => {:address => ", "}).
to_return(body: File.read(File.expand_path('../../fixtures/unknown_address.txt', __FILE__)))
stub_request(:get, "http://maps.google.com/maps/geo"). stub_request(:get, "http://maps.google.com/maps/geo").
with(:query => {:key => "REPLACE_WITH_YOUR_GOOGLE_KEY", :oe => "utf-8", :output => "xml", :q => ", "}). with(:query => {:key => "REPLACE_WITH_YOUR_GOOGLE_KEY", :oe => "utf-8", :output => "xml", :q => ", "}).
to_return(body: File.read(File.expand_path('../../fixtures/unknown_address.kml', __FILE__))) to_return(body: File.read(File.expand_path('../../fixtures/unknown_address.kml', __FILE__)))