aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2012-05-18 17:30:35 -0700
committerJeremy Kemper <jeremy@bitsweat.net>2012-05-18 17:30:35 -0700
commit98657ad10c0bd799b8b314b9af3f0495267b2ddb (patch)
tree23065a3f15c2eec758db07ac7746a1bec993caee /activesupport/test
parent49b72fa864364b081770c52d1b0847eac00b2be2 (diff)
parent900dbc54f17500e14e481eab2ebf88acfc5448aa (diff)
downloadrails-98657ad10c0bd799b8b314b9af3f0495267b2ddb.tar.gz
rails-98657ad10c0bd799b8b314b9af3f0495267b2ddb.tar.bz2
rails-98657ad10c0bd799b8b314b9af3f0495267b2ddb.zip
Merge pull request #6376 from jgaskins/timestamp-microseconds
Increase numeric-timestamp precision to nanoseconds
Diffstat (limited to 'activesupport/test')
-rw-r--r--activesupport/test/core_ext/time_ext_test.rb4
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 8bf3e6e7ae..15c04bedf7 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