diff options
author | Jeremy Daer <jeremydaer@gmail.com> | 2016-04-19 00:45:30 -0700 |
---|---|---|
committer | Jeremy Daer <jeremydaer@gmail.com> | 2016-04-19 00:45:30 -0700 |
commit | 4d635bd6e86f2728419cfc4c56f9a4c6bde8aeae (patch) | |
tree | 7e267487422ee329ecb927bd8b9255ec689eda60 /activesupport/test/core_ext | |
parent | ca13731e617180a0d7fde3c2a3d73dc396b6bda7 (diff) | |
parent | 29e876f775a5bae0a8bf60c9ec75d89681717a9c (diff) | |
download | rails-4d635bd6e86f2728419cfc4c56f9a4c6bde8aeae.tar.gz rails-4d635bd6e86f2728419cfc4c56f9a4c6bde8aeae.tar.bz2 rails-4d635bd6e86f2728419cfc4c56f9a4c6bde8aeae.zip |
Merge pull request #24552 from yui-knk/raise_argument_error
Raise `ArgumentError` when an invalid form is passed to `Date#to_time`
Diffstat (limited to 'activesupport/test/core_ext')
-rw-r--r-- | activesupport/test/core_ext/date_ext_test.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/activesupport/test/core_ext/date_ext_test.rb b/activesupport/test/core_ext/date_ext_test.rb index 0fc3f765f5..932675a50d 100644 --- a/activesupport/test/core_ext/date_ext_test.rb +++ b/activesupport/test/core_ext/date_ext_test.rb @@ -49,6 +49,10 @@ class DateExtCalculationsTest < ActiveSupport::TestCase end end end + + assert_raise(ArgumentError) do + Date.new(2005, 2, 21).to_time(:tokyo) + end end def test_compare_to_time |