aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test
diff options
context:
space:
mode:
authorCarl Lerche <carllerche@mac.com>2009-09-01 12:19:09 -0700
committerCarl Lerche <carllerche@mac.com>2009-09-01 12:19:09 -0700
commit016b1d3596ce12367edac8bb442f5c630a453ecf (patch)
tree49435918ebb372f617c3cc95bc495f6dd5c12d24 /activesupport/test
parent22d5e3d89d619acb9179dfcdd33f1afaee9567ca (diff)
parentda636809daca9c338200811d3590e446f57c8e81 (diff)
downloadrails-016b1d3596ce12367edac8bb442f5c630a453ecf.tar.gz
rails-016b1d3596ce12367edac8bb442f5c630a453ecf.tar.bz2
rails-016b1d3596ce12367edac8bb442f5c630a453ecf.zip
Merge branch 'master' of git@github.com:rails/rails
Diffstat (limited to 'activesupport/test')
-rw-r--r--activesupport/test/core_ext/date_ext_test.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/activesupport/test/core_ext/date_ext_test.rb b/activesupport/test/core_ext/date_ext_test.rb
index 8a7bae5fc6..18422d68bc 100644
--- a/activesupport/test/core_ext/date_ext_test.rb
+++ b/activesupport/test/core_ext/date_ext_test.rb
@@ -251,6 +251,12 @@ class DateExtCalculationsTest < Test::Unit::TestCase
Time.zone_default = nil
end
+ def test_date_advance_should_not_change_passed_options_hash
+ options = { :years => 3, :months => 11, :days => 2 }
+ Date.new(2005,2,28).advance(options)
+ assert_equal({ :years => 3, :months => 11, :days => 2 }, options)
+ end
+
protected
def with_env_tz(new_tz = 'US/Eastern')
old_tz, ENV['TZ'] = ENV['TZ'], new_tz