spec/format_spec.rb in json-ld-1.1.7 vs spec/format_spec.rb in json-ld-1.1.8

- old
+ new

@@ -12,25 +12,25 @@ describe ".for" do formats = [ :jsonld, "etc/doap.jsonld", - {:file_name => 'etc/doap.jsonld'}, - {:file_extension => 'jsonld'}, - {:content_type => 'application/ld+json'}, - {:content_type => 'application/x-ld+json'}, + {file_name: 'etc/doap.jsonld'}, + {file_extension: 'jsonld'}, + {content_type: 'application/ld+json'}, + {content_type: 'application/x-ld+json'}, ].each do |arg| it "discovers with #{arg.inspect}" do expect(RDF::Format.for(arg)).to eq @format_class end end { - :jsonld => '{"@context" => "foo"}', - :context => %({\n"@context": {), - :id => %({\n"@id": {), - :type => %({\n"@type": {), + jsonld: '{"@context" => "foo"}', + context: %({\n"@context": {), + id: %({\n"@id": {), + type: %({\n"@type": {), }.each do |sym, str| it "detects #{sym}" do expect(@format_class.for {str}).to eq @format_class end end @@ -44,25 +44,25 @@ specify {expect(@format_class.to_sym).to eq :jsonld} end describe ".detect" do { - :jsonld => '{"@context" => "foo"}', + jsonld: '{"@context" => "foo"}', }.each do |sym, str| it "detects #{sym}" do expect(@format_class.detect(str)).to be_truthy end end { - :n3 => "@prefix foo: <bar> .\nfoo:bar = {<a> <b> <c>} .", - :nquads => "<a> <b> <c> <d> . ", - :rdfxml => '<rdf:RDF about="foo"></rdf:RDF>', - :rdfa => '<div about="foo"></div>', - :microdata => '<div itemref="bar"></div>', - :ntriples => "<a> <b> <c> .", - :multi_line => '<a>\n <b>\n "literal"\n .', - :turtle => "@prefix foo: <bar> .\n foo:a foo:b <c> .", + n3: "@prefix foo: <bar> .\nfoo:bar = {<a> <b> <c>} .", + nquads: "<a> <b> <c> <d> . ", + rdfxml: '<rdf:RDF about="foo"></rdf:RDF>', + rdfa: '<div about="foo"></div>', + microdata: '<div itemref="bar"></div>', + ntriples: "<a> <b> <c> .", + multi_line: '<a>\n <b>\n "literal"\n .', + turtle: "@prefix foo: <bar> .\n foo:a foo:b <c> .", }.each do |sym, str| it "does not detect #{sym}" do expect(@format_class.detect(str)).to be_falsey end end