aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/core_ext/duration_test.rb
diff options
context:
space:
mode:
authorMichael Koziarski <michael@koziarski.com>2007-01-21 23:31:41 +0000
committerMichael Koziarski <michael@koziarski.com>2007-01-21 23:31:41 +0000
commit59418618b9926ae0efebde29eb8765c4895635b9 (patch)
treee0c3b1caee5782c65cecc7f50f1e2033e10d6e3c /activesupport/test/core_ext/duration_test.rb
parent704f2cc6dee9d55d19bfad8e4a8308fdee71bf6f (diff)
downloadrails-59418618b9926ae0efebde29eb8765c4895635b9.tar.gz
rails-59418618b9926ae0efebde29eb8765c4895635b9.tar.bz2
rails-59418618b9926ae0efebde29eb8765c4895635b9.zip
Improve test coverage of Duration. Closes #7182 [richcollins]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6007 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activesupport/test/core_ext/duration_test.rb')
-rw-r--r--activesupport/test/core_ext/duration_test.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/activesupport/test/core_ext/duration_test.rb b/activesupport/test/core_ext/duration_test.rb
index 22950d8710..55b4df9f80 100644
--- a/activesupport/test/core_ext/duration_test.rb
+++ b/activesupport/test/core_ext/duration_test.rb
@@ -14,4 +14,8 @@ class DurationTest < Test::Unit::TestCase
def test_minus_with_duration_does_not_break_subtraction_of_date_from_date
assert_nothing_raised { Date.today - Date.today }
end
+
+ def test_plus_with_time
+ assert_equal 1 + 1.second, 1.second + 1, "Duration + Numeric should == Numeric + Duration"
+ end
end