aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test
diff options
context:
space:
mode:
authorDiego Carrion <dc.rec1@gmail.com>2011-03-09 20:27:29 -0300
committerSantiago Pastorino <santiago@wyeworks.com>2011-03-22 21:09:54 -0300
commit7004434ad85901215e1cb4367b2b8b1e7f9063c7 (patch)
tree2a891065132dea43f267318d9d58cd52f8958c28 /activesupport/test
parent450f7cf01b855b536416fc048a92c4309da2492e (diff)
downloadrails-7004434ad85901215e1cb4367b2b8b1e7f9063c7.tar.gz
rails-7004434ad85901215e1cb4367b2b8b1e7f9063c7.tar.bz2
rails-7004434ad85901215e1cb4367b2b8b1e7f9063c7.zip
test json decoding with time parsing disabled with all backends and respect ActiveSupport.parse_json_times when converting to yaml
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
Diffstat (limited to 'activesupport/test')
-rw-r--r--activesupport/test/json/decoding_test.rb6
1 files changed, 2 insertions, 4 deletions
diff --git a/activesupport/test/json/decoding_test.rb b/activesupport/test/json/decoding_test.rb
index 24d9f88c09..6b890c7d46 100644
--- a/activesupport/test/json/decoding_test.rb
+++ b/activesupport/test/json/decoding_test.rb
@@ -72,13 +72,11 @@ class TestJSONDecoding < ActiveSupport::TestCase
end
end
end
- end
- if backends.include?("JSONGem")
- test "json decodes time json with time parsing disabled" do
+ test "json decodes time json with time parsing disabled with the #{backend} backend" do
ActiveSupport.parse_json_times = false
expected = {"a" => "2007-01-01 01:12:34 Z"}
- ActiveSupport::JSON.with_backend "JSONGem" do
+ ActiveSupport::JSON.with_backend backend do
assert_equal expected, ActiveSupport::JSON.decode(%({"a": "2007-01-01 01:12:34 Z"}))
end
end