From f9e1ade492d696a4b3c0637664faf649b63da25e Mon Sep 17 00:00:00 2001 From: Alex Reisner <alex@alexreisner.com> Date: Tue, 5 Feb 2013 12:12:59 -0500 Subject: [PATCH] Rename and fix bugs in test. --- test/result_test.rb | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/test/result_test.rb b/test/result_test.rb index a62a9e38..0e248e56 100644 --- a/test/result_test.rb +++ b/test/result_test.rb @@ -12,11 +12,13 @@ class ResultTest < Test::Unit::TestCase end end - def test_yandex_result_without_city_has_not_raises_exception - Geocoder.configure(:lookup => :yandex) - set_api_key!(:yandex) - result = Geocoder.search([45.423733, -75.676333]).first - assert result.city, "" + def test_yandex_result_without_city_does_not_raise_exception + assert_nothing_raised do + Geocoder.configure(:lookup => :yandex) + set_api_key!(:yandex) + result = Geocoder.search("no city and town").first + assert_equal "", result.city + end end -- GitLab