replace multi_json dependency with regular stdlib JSON

JSON has been part of the ruby stdlib since 1.9.0 (see
https://github.com/ruby/ruby/commit/af1c4167), and the latest version of
google-api-client requires ruby 2.0 or better so we can assume it's available
This commit is contained in:
James Healy committed 2016-02-25 13:27:33 +11:00
1 parent b191e60cfc
commit 4b9a63c086
6 files changed
+8 -11

No files matched your search

@@ -23,7 +23,7 @@ FIXTURES_PATH = File.expand_path('../../../fixtures', __FILE__)
RSpec.describe Google::APIClient::ClientSecrets do
describe '::new' do
let(:filename) { File.join(FIXTURES_PATH, 'files', 'client_secrets.json') }
let(:data) { File.open(filename, 'r') { |file| MultiJson.load(file.read) } }
let(:data) { File.open(filename, 'r') { |file| JSON.load(file.read) } }
context 'without options' do
subject { Google::APIClient::ClientSecrets.new(data) }
@@ -367,7 +367,7 @@ RSpec.describe Google::APIClient::ClientSecrets do
context 'with invalid JSON file' do
it 'should raise exception' do
file = File.join(FIXTURES_PATH, 'files', 'invalid.json')
expect { Google::APIClient::ClientSecrets.load(file) }.to raise_exception(MultiJson::ParseError)
expect { Google::APIClient::ClientSecrets.load(file) }.to raise_exception(JSON::ParserError)
end
end