diff options
author | Santiago Pastorino <santiago@wyeworks.com> | 2010-07-12 09:51:37 +0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2010-07-12 09:59:52 +0800 |
commit | 725090942f698f334b42c332036c571640697a52 (patch) | |
tree | 71895da14602876b43fe13edbe90a3e8b8808f53 | |
parent | 913aeaef818ca7729064c60bf0a877afbb156d61 (diff) | |
download | rails-725090942f698f334b42c332036c571640697a52.tar.gz rails-725090942f698f334b42c332036c571640697a52.tar.bz2 rails-725090942f698f334b42c332036c571640697a52.zip |
We shouldn't rely on float comparison, delta added just in case float representation of this values aren't equal
-rw-r--r-- | activesupport/test/notifications_test.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/activesupport/test/notifications_test.rb b/activesupport/test/notifications_test.rb index e11de5f67a..3e16e01d89 100644 --- a/activesupport/test/notifications_test.rb +++ b/activesupport/test/notifications_test.rb @@ -198,9 +198,9 @@ module Notifications 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 |