aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/test/json_test.rb
diff options
context:
space:
mode:
authorWilliam Woodruff2016-11-20 13:00:01 -0500
committerWilliam Woodruff2016-11-20 20:06:25 -0500
commitd07b9ed7f2e8806b1840b4f60605ef45487655e1 (patch)
tree90387191e0debec6f578dc58646d7fb588f08333 /Library/Homebrew/test/json_test.rb
parent54d18cee17a7af49b5858dd752bf2eda59014472 (diff)
downloadbrew-d07b9ed7f2e8806b1840b4f60605ef45487655e1.tar.bz2
Replace Utils::JSON with corelib JSON calls.
Diffstat (limited to 'Library/Homebrew/test/json_test.rb')
-rw-r--r--Library/Homebrew/test/json_test.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/Library/Homebrew/test/json_test.rb b/Library/Homebrew/test/json_test.rb
index 14d2f2b4c..7c4c3671d 100644
--- a/Library/Homebrew/test/json_test.rb
+++ b/Library/Homebrew/test/json_test.rb
@@ -1,20 +1,20 @@
require "testing_env"
-require "utils/json"
+require "json"
class JsonSmokeTest < Homebrew::TestCase
def test_encode
hash = { "foo" => ["bar", "baz"] }
json = '{"foo":["bar","baz"]}'
- assert_equal json, Utils::JSON.dump(hash)
+ assert_equal json, JSON.generate(hash)
end
def test_decode
hash = { "foo" => ["bar", "baz"], "qux" => 1 }
json = '{"foo":["bar","baz"],"qux":1}'
- assert_equal hash, Utils::JSON.load(json)
+ assert_equal hash, JSON.parse(json)
end
def test_decode_failure
- assert_raises(Utils::JSON::Error) { Utils::JSON.load("nope") }
+ assert_raises(JSON::ParserError) { JSON.parse("nope") }
end
end