aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/json/encoding_test.rb
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2007-05-23 08:43:48 +0000
committerJeremy Kemper <jeremy@bitsweat.net>2007-05-23 08:43:48 +0000
commit7b99b403521f0a4c15903c1672cb22acb65f0afb (patch)
tree9d89e6248adacfc886a43ef3c78a9506161058a0 /activesupport/test/json/encoding_test.rb
parent301b92370a3e27f9ffd40c64824bc7e8313541fb (diff)
downloadrails-7b99b403521f0a4c15903c1672cb22acb65f0afb.tar.gz
rails-7b99b403521f0a4c15903c1672cb22acb65f0afb.tar.bz2
rails-7b99b403521f0a4c15903c1672cb22acb65f0afb.zip
Fix JSON date/time conversion tests.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6822 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activesupport/test/json/encoding_test.rb')
-rw-r--r--activesupport/test/json/encoding_test.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/activesupport/test/json/encoding_test.rb b/activesupport/test/json/encoding_test.rb
index dbb96cb38c..3c0e0bc6b2 100644
--- a/activesupport/test/json/encoding_test.rb
+++ b/activesupport/test/json/encoding_test.rb
@@ -30,8 +30,8 @@ class TestJSONEncoding < Test::Unit::TestCase
RegexpTests = [[ /^a/, '/^a/' ], [/^\w{1,2}[a-z]+/ix, '/^\\w{1,2}[a-z]+/ix']]
DateTests = [[ Date.new(2005,1,1), %("01/01/2005") ]]
- TimeTests = [[ Time.at(0), %("12/31/1969 16:00:00 #{Time.at(0).zone}") ]]
- DateTimeTests = [[ Time.at(0), %("12/31/1969 16:00:00 #{Time.at(0).zone}") ]]
+ TimeTests = [[ Time.at(0), %("#{Time.at(0).strftime('%m/%d/%Y %H:%M:%S %Z')}") ]]
+ DateTimeTests = [[ DateTime.new(0), %("#{DateTime.new(0).strftime('%m/%d/%Y %H:%M:%S %Z')}") ]]
constants.grep(/Tests$/).each do |class_tests|
define_method("test_#{class_tests[0..-6].downcase}") do