diff --git a/test/test_helper.rb b/test/test_helper.rb index ba48c1721ed5a353a55a68d96387f2ecb897b341..61b1d058fdf2e6031d4c1087b5b62e2173f50d2f 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -273,12 +273,9 @@ class Test::Unit::TestCase end def is_nan_coordinates?(coordinates) - if defined?(::Float::NAN) - coordinates == ([ Geocoder::Calculations::NAN ] * 2 ) - else - return false unless coordinates.respond_to? :size - coordinates.size == 2 && coordinates[0].nan? && coordinates[1].nan? - end + return false unless coordinates.respond_to? :size # Should be an array + return false unless coordinates.size == 2 # Should have dimension 2 + coordinates[0].nan? && coordinates[1].nan? # Both coordinates should be NaN end end