Permalink
Browse files

We shouldn't rely on float comparison, delta added just in case float…

… representation of this values aren't equal
  • Loading branch information...
spastorino authored and tenderlove committed Jul 12, 2010
1 parent 913aeae commit 725090942f698f334b42c332036c571640697a52
Showing with 3 additions and 3 deletions.
  1. +3 −3 activesupport/test/notifications_test.rb
@@ -198,9 +198,9 @@ def test_events_are_initialized_with_details
time = Time.now
event = event(:foo, time, time + 0.01, random_id, {})
- assert_equal :foo, event.name
- assert_equal time, event.time
- assert_equal 10.0, event.duration
+ assert_equal :foo, event.name
+ assert_equal time, event.time
+ assert_in_delta 10.0, event.duration, 0.00000000000001
end
def test_events_consumes_information_given_as_payload

0 comments on commit 7250909

Please sign in to comment.