diff options
author | Jamie Gaskins <jgaskins@gmail.com> | 2012-05-18 18:42:35 +0800 |
---|---|---|
committer | Jamie Gaskins <jgaskins@gmail.com> | 2012-05-19 08:20:08 +0800 |
commit | 900dbc54f17500e14e481eab2ebf88acfc5448aa (patch) | |
tree | d34cc01afa34e5782eef3cdbcfee6fdc77c827e4 /activesupport/test | |
parent | 88949f8ac1759d07fe8502f863dac20f509163c3 (diff) | |
download | rails-900dbc54f17500e14e481eab2ebf88acfc5448aa.tar.gz rails-900dbc54f17500e14e481eab2ebf88acfc5448aa.tar.bz2 rails-900dbc54f17500e14e481eab2ebf88acfc5448aa.zip |
Increase `AR#cache_key` precision to nanoseconds
Diffstat (limited to 'activesupport/test')
-rw-r--r-- | activesupport/test/core_ext/time_ext_test.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/activesupport/test/core_ext/time_ext_test.rb b/activesupport/test/core_ext/time_ext_test.rb index 4c1ed4b1ae..8f5fd79d7d 100644 --- a/activesupport/test/core_ext/time_ext_test.rb +++ b/activesupport/test/core_ext/time_ext_test.rb @@ -557,12 +557,14 @@ class TimeExtCalculationsTest < ActiveSupport::TestCase end def test_to_s - time = Time.utc(2005, 2, 21, 17, 44, 30) + time = Time.utc(2005, 2, 21, 17, 44, 30.12345678901) assert_equal time.to_default_s, time.to_s assert_equal time.to_default_s, time.to_s(:doesnt_exist) assert_equal "2005-02-21 17:44:30", time.to_s(:db) assert_equal "21 Feb 17:44", time.to_s(:short) assert_equal "17:44", time.to_s(:time) + assert_equal "20050221174430", time.to_s(:number) + assert_equal "20050221174430123456789", time.to_s(:nsec) assert_equal "February 21, 2005 17:44", time.to_s(:long) assert_equal "February 21st, 2005 17:44", time.to_s(:long_ordinal) with_env_tz "UTC" do |