Sha256: 55eecb7939fed88ed9fbcbe83dc5080b36d49a1f34083830cf3ca9fdbb653f94
Contents?: true
Size: 628 Bytes
Versions: 2
Compression:
Stored size: 628 Bytes
Contents
require 'spec_helper' describe LinkShrink::JSONParser do include_examples 'shared_examples' describe '.parse_json' do it 'delegates to the JSON parser' do expect(link_shrink.parse_json(json_response)) .to eq(parsed_json) end end describe '.cleanup_json' do let(:json) { "{\n \"kind\": \"urlshortener#url\",\n \"id\": \"http://goo.gl/fbsS\",\n \"longUrl\": \"http://www.google.com/\"\n}\n" } it 'cleans JSON response' do expect(link_shrink.cleanup_json(json)) .to eq('{"kind":"urlshortener#url","id":"http://goo.gl/fbsS","longUrl":"http://www.google.com/"}') end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
link_shrink-0.0.3 | spec/link_shrink/json_parser_spec.rb |
link_shrink-0.0.2 | spec/link_shrink/json_parser_spec.rb |