Permalink
Browse files

Ensure test sets json time format flag

  • Loading branch information...
jeremy committed Jan 28, 2010
1 parent f15bbcf commit d58398c2b5e98aad18dc72790230f338c10d145c
Showing with 4 additions and 1 deletion.
  1. +4 −1 activesupport/test/core_ext/time_with_zone_test.rb
@@ -56,8 +56,11 @@ def test_zone
assert_equal 'EDT', ActiveSupport::TimeWithZone.new(Time.utc(2000, 6), @time_zone).zone #dst
end
- def test_to_json
+ def test_to_json_with_use_standard_json_time_format_config_set_to_false
+ old, ActiveSupport.use_standard_json_time_format = ActiveSupport.use_standard_json_time_format, false
assert_equal "\"1999/12/31 19:00:00 -0500\"", ActiveSupport::JSON.encode(@twz)
+ ensure
+ ActiveSupport.use_standard_json_time_format = old
end
def test_to_json_with_use_standard_json_time_format_config_set_to_true

0 comments on commit d58398c

Please sign in to comment.