X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/50f658142be71156945d5ab3a73ae3851365768b..0a6601e9ea9863279390f5db8cb629dca151d90d:/test/lib/short_link_test.rb diff --git a/test/lib/short_link_test.rb b/test/lib/short_link_test.rb index a0a1023bb..a32e1ac20 100644 --- a/test/lib/short_link_test.rb +++ b/test/lib/short_link_test.rb @@ -20,7 +20,7 @@ class ShortLinkTest < ActiveSupport::TestCase # smaller range. distance = Math.sqrt(((lat - lat2)**2) + ((lon - lon2)**2)) max_distance = 360.0 / (1 << (zoom + 8)) * 0.5 * Math.sqrt(5) - assert max_distance > distance, "Maximum expected error exceeded: #{max_distance} <= #{distance} for (#{lat}, #{lon}, #{zoom})." + assert_operator max_distance, :>, distance, "Maximum expected error exceeded: #{max_distance} <= #{distance} for (#{lat}, #{lon}, #{zoom})." end end