From ab2d6abb55b45543656e2a0238857d3ba8379257 Mon Sep 17 00:00:00 2001 From: Levin Alexander Date: Thu, 25 Jun 2009 22:47:27 +0200 Subject: make #inspect if zero length duration return '0 seconds' instead of empty string [#2838 state:resolved] Signed-off-by: Yehuda Katz + Carl Lerche --- activesupport/test/core_ext/duration_test.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'activesupport/test/core_ext') 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 -- cgit v1.2.3