aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/json/encoding_test.rb
diff options
context:
space:
mode:
authorErich Menge <erich.menge@me.com>2012-05-30 11:29:09 -0500
committerRafael Mendonça França <rafaelmfranca@gmail.com>2012-08-07 19:36:08 -0300
commit83f2ffcf4388f08e1b15d58b66fff1dfad9e99ef (patch)
tree6cee15be4a09869cb59485590a34e216b00b4176 /activesupport/test/json/encoding_test.rb
parent481dac9ec0791de68b1cc78feff23d946270f00a (diff)
downloadrails-83f2ffcf4388f08e1b15d58b66fff1dfad9e99ef.tar.gz
rails-83f2ffcf4388f08e1b15d58b66fff1dfad9e99ef.tar.bz2
rails-83f2ffcf4388f08e1b15d58b66fff1dfad9e99ef.zip
Deprecate ActiveSupport::JSON::Variable
Reason: ActiveSupport::JSON::Variable is not used anymore internally. It was deprecated in 3-2-stable but we reverted all the deprecation for point releases. See #6536 and #6546. Conflicts: activesupport/lib/active_support/json/variable.rb
Diffstat (limited to 'activesupport/test/json/encoding_test.rb')
-rw-r--r--activesupport/test/json/encoding_test.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/activesupport/test/json/encoding_test.rb b/activesupport/test/json/encoding_test.rb
index a947635f4a..7ed71f9abc 100644
--- a/activesupport/test/json/encoding_test.rb
+++ b/activesupport/test/json/encoding_test.rb
@@ -85,6 +85,13 @@ class TestJSONEncoding < ActiveSupport::TestCase
end
end
+ def test_json_variable
+ assert_deprecated do
+ assert_equal ActiveSupport::JSON::Variable.new('foo'), 'foo'
+ assert_equal ActiveSupport::JSON::Variable.new('alert("foo")'), 'alert("foo")'
+ end
+ end
+
def test_hash_encoding
assert_equal %({\"a\":\"b\"}), ActiveSupport::JSON.encode(:a => :b)
assert_equal %({\"a\":1}), ActiveSupport::JSON.encode('a' => 1)