aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/core_ext/date_time_ext_test.rb
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2010-05-12 23:04:17 +0200
committerXavier Noria <fxn@hashref.com>2010-05-12 23:04:17 +0200
commit2203c781a7dfa8b0c8b6c97cd318d941f9fbb26c (patch)
tree49573544181a36d9a2fee792a140a54c5947067e /activesupport/test/core_ext/date_time_ext_test.rb
parent903637f5f0a1a9789fa12da1519e028b9faa37d8 (diff)
downloadrails-2203c781a7dfa8b0c8b6c97cd318d941f9fbb26c.tar.gz
rails-2203c781a7dfa8b0c8b6c97cd318d941f9fbb26c.tar.bz2
rails-2203c781a7dfa8b0c8b6c97cd318d941f9fbb26c.zip
defines prev_(month|year) in Date and Time to ease transition to 1.9, and deprecates last_(month|year)
Diffstat (limited to 'activesupport/test/core_ext/date_time_ext_test.rb')
-rw-r--r--activesupport/test/core_ext/date_time_ext_test.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/activesupport/test/core_ext/date_time_ext_test.rb b/activesupport/test/core_ext/date_time_ext_test.rb
index f9af059acd..4780760a19 100644
--- a/activesupport/test/core_ext/date_time_ext_test.rb
+++ b/activesupport/test/core_ext/date_time_ext_test.rb
@@ -127,8 +127,8 @@ class DateTimeExtCalculationsTest < Test::Unit::TestCase
assert_equal DateTime.civil(2005,2,28,10), DateTime.civil(2004,2,29,10,0,0).years_since(1) # 1 year since leap day
end
- def test_last_year
- assert_equal DateTime.civil(2004,6,5,10), DateTime.civil(2005,6,5,10,0,0).last_year
+ def test_prev_year
+ assert_equal DateTime.civil(2004,6,5,10), DateTime.civil(2005,6,5,10,0,0).prev_year
end
def test_next_year
@@ -200,8 +200,8 @@ class DateTimeExtCalculationsTest < Test::Unit::TestCase
assert_equal DateTime.civil(2005, 9, 30), DateTime.civil(2005, 8, 31).next_month
end
- def test_last_month_on_31st
- assert_equal DateTime.civil(2004, 2, 29), DateTime.civil(2004, 3, 31).last_month
+ def test_prev_month_on_31st
+ assert_equal DateTime.civil(2004, 2, 29), DateTime.civil(2004, 3, 31).prev_month
end
def test_xmlschema