ruby on rails - Webmock JSON response for geocoding -
I try to stub a geocoding HTTP request with webmock
but always do it Error:
JSON FILE " "47.802898", "Offsetlon": "13.04185", "Radius": "8600", "Boundingbox": {"Answer": "47.854401", "South": "47.7514", "East": "13.1075 "," West ":" 12.986 9 "}," Name ":" "," Line 1 ":" "," Line 2 ":" 5020 Salzburg "," La "": "", "" "," "", "" "" "," "" "", "" "" "," "Salzburg", "State": "Salzburg", "Country": "Austria", "Country Code": "Salahburg", "County": "Salzburg", "City": "5020", "Neighborhood": " : "5020", "hash": "5", "Countycode": "5", "Timezone": "Europe / Vienna", "Usp" Thanks! Thanks! / P> I did not get the error of my JSON file completed: NoMethodError: Undefined method `[] 'for zero: before NilClass
context" Geocoding ": each Do # User = Fabricate: User stub_request (: get, /.*yboss.yahooapis.com*/).to_return(:body = & gt; file.red (file.) ("Spec", "fixtures", "geoder "," YahooHaps_Data .Jesen "))) If this coordinate is done 'GOCOD', then 'without direction' = location. New (name: "test", street: "rainierstrash 1", pincode: "5020", country: "AT", user: @ user, affiliate: @ user) result = without coordinates.jocode-coordinate.Cordinate "47.8029", "Longitude": "13.0472", "OffsetLat": "/" and "End". [47.8029, 13.0472] End End
{"bossresponse": {"responsecode": "200", "placefinder": {"press Future ":" 0 "," count ":" 1 "," request ":" Flags = Jeakstisar and amp; "47.05383": "47", "Longitude": "47.80067", "Longitude": "", "South": "Gflags = AC and locale = en_US and location = Salzburg", "Result": [{"Quality": "40", "Quality" "4780067", "Offsetlone": "13.04338", "Radius": "8600", "Boundingbox": "Answer": "47.85386", "" "" "," Line 4 ":" 13.12707 " "" "," "Line": "", "line", "line" , "Home": "", "home": "", "street": "", "xstreet": "", "untitpe": "", "unit": "", "postal": "" Austria "," Country code ":" AT "," neighborhood ":" "," city ":" salzburg "," county ":" year "524", "Timezone": "Europe / Vienna", "Uszip": "5020", "hash": "", ":" "," , "Vivek": "547826", "Woetype": "7"}]}}}
Comments
Post a Comment