diff options
author | Levin Alexander <mail@levinalex.net> | 2009-06-25 22:47:27 +0200 |
---|---|---|
committer | Yehuda Katz + Carl Lerche <ykatz+clerche@engineyard.com> | 2009-07-02 11:22:25 -0700 |
commit | ab2d6abb55b45543656e2a0238857d3ba8379257 (patch) | |
tree | 311bcd746c4f0b58b90e96c63d75f544485dc01f /activesupport/test | |
parent | cf5b2b250f9d7014c06f91527f9bd1bbfa7f3bd6 (diff) | |
download | rails-ab2d6abb55b45543656e2a0238857d3ba8379257.tar.gz rails-ab2d6abb55b45543656e2a0238857d3ba8379257.tar.bz2 rails-ab2d6abb55b45543656e2a0238857d3ba8379257.zip |
make #inspect if zero length duration return '0 seconds' instead of empty string [#2838 state:resolved]
Signed-off-by: Yehuda Katz + Carl Lerche <ykatz+clerche@engineyard.com>
Diffstat (limited to 'activesupport/test')
-rw-r--r-- | activesupport/test/core_ext/duration_test.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/activesupport/test/core_ext/duration_test.rb b/activesupport/test/core_ext/duration_test.rb index 6f16621ae5..42b4f10172 100644 --- a/activesupport/test/core_ext/duration_test.rb +++ b/activesupport/test/core_ext/duration_test.rb @@ -3,6 +3,7 @@ require 'active_support/time' class DurationTest < ActiveSupport::TestCase def test_inspect + assert_equal '0 seconds', 0.seconds.inspect assert_equal '1 month', 1.month.inspect assert_equal '1 month and 1 day', (1.month + 1.day).inspect assert_equal '6 months and -2 days', (6.months - 2.days).inspect |