aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2007-06-04 18:14:42 +0000
committerJeremy Kemper <jeremy@bitsweat.net>2007-06-04 18:14:42 +0000
commit601778e38af53c66d604fe31a3b84ba84d973511 (patch)
tree8bd6f27a431e2a20c83fac11d18a2315a0d33ae0 /activesupport/test
parent1312259294e859646d5c1a4d3000f2cd160fae94 (diff)
downloadrails-601778e38af53c66d604fe31a3b84ba84d973511.tar.gz
rails-601778e38af53c66d604fe31a3b84ba84d973511.tar.bz2
rails-601778e38af53c66d604fe31a3b84ba84d973511.zip
Date.yesterday and .tomorrow. Closes #8571.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6934 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activesupport/test')
-rw-r--r--activesupport/test/core_ext/date_ext_test.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/activesupport/test/core_ext/date_ext_test.rb b/activesupport/test/core_ext/date_ext_test.rb
index 04100eec15..26905add17 100644
--- a/activesupport/test/core_ext/date_ext_test.rb
+++ b/activesupport/test/core_ext/date_ext_test.rb
@@ -131,4 +131,12 @@ class DateExtCalculationsTest < Test::Unit::TestCase
def test_last_month_on_31st
assert_equal Date.new(2004, 2, 29), Date.new(2004, 3, 31).last_month
end
+
+ def test_yesterday_constructor
+ assert_equal Date.today - 1, Date.yesterday
+ end
+
+ def test_tomorrow_constructor
+ assert_equal Date.today + 1, Date.tomorrow
+ end
end