diff options
author | Andrew White <andyw@pixeltrix.co.uk> | 2013-07-29 10:25:06 -0700 |
---|---|---|
committer | Andrew White <andyw@pixeltrix.co.uk> | 2013-07-29 10:25:06 -0700 |
commit | c90105613188a088b9834a701e3ab15fa3e92bad (patch) | |
tree | 031b3b717ab637f58961d49b4fd437cc5996bca2 /activesupport/test/core_ext/date_ext_test.rb | |
parent | b51786d26e8262534f043c5c614b9e04cd33dbc1 (diff) | |
parent | 1b6bbb09532e164bf373c1cd273e4ec9062b9e56 (diff) | |
download | rails-c90105613188a088b9834a701e3ab15fa3e92bad.tar.gz rails-c90105613188a088b9834a701e3ab15fa3e92bad.tar.bz2 rails-c90105613188a088b9834a701e3ab15fa3e92bad.zip |
Merge pull request #10879 from makaroni4/master
Added Time#middle_of_day method
Diffstat (limited to 'activesupport/test/core_ext/date_ext_test.rb')
-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 502fb21558..eab3aa7a6e 100644 --- a/activesupport/test/core_ext/date_ext_test.rb +++ b/activesupport/test/core_ext/date_ext_test.rb @@ -248,6 +248,10 @@ class DateExtCalculationsTest < ActiveSupport::TestCase assert_equal Time.local(2005,2,21,0,0,0), Date.new(2005,2,21).beginning_of_day end + def test_middle_of_day + assert_equal Time.local(2005,2,21,12,0,0), Date.new(2005,2,21).middle_of_day + end + def test_beginning_of_day_when_zone_is_set zone = ActiveSupport::TimeZone['Eastern Time (US & Canada)'] with_env_tz 'UTC' do |