Sha256: 15a8d377267b580690efc3b76bcbaddebf55cc4f45a98ec189eeac94a0eb7495

Contents?: true

Size: 1.62 KB

Versions: 14

Compression:

Stored size: 1.62 KB

Contents

# coding: utf-8
require_relative 'spec_helper'

describe JSON::LD do
  describe "test suite" do
    require_relative 'suite_helper'
    m = Fixtures::SuiteTest::Manifest.open("#{Fixtures::SuiteTest::SUITE}expand-manifest.jsonld")
    describe m.name do
      m.entries.each do |t|
        # MultiJson use OJ, by default, which doesn't handle native numbers the same as the JSON gem.
        t.options[:adapter] = :json_gem if %w(#tjs12).include?(t.property('@id'))
        specify "#{t.property('@id')}: #{t.name} unordered#{' (negative test)' unless t.positiveTest?}" do
          t.options[:ordered] = false
          if %w(#t0068).include?(t.property('@id'))
            expect{t.run self}.to write("[DEPRECATION]").to(:error)
          elsif %w(#t0005 #tpr34 #tpr35 #tpr36 #tpr37 #tpr38 #tpr39 #t0119 #t0120).include?(t.property('@id'))
            expect{t.run self}.to write("beginning with '@' are reserved for future use").to(:error)
          else
            expect {t.run self}.not_to write.to(:error)
          end
        end

        specify "#{t.property('@id')}: #{t.name} ordered#{' (negative test)' unless t.positiveTest?}" do
          t.options[:ordered] = true
          if %w(#t0068).include?(t.property('@id'))
            expect{t.run self}.to write("[DEPRECATION]").to(:error)
          elsif %w(#t0005 #tpr34 #tpr35 #tpr36 #tpr37 #tpr38 #tpr39 #t0119 #t0120).include?(t.property('@id'))
            expect{t.run self}.to write("beginning with '@' are reserved for future use").to(:error)
          else
            expect {t.run self}.not_to write.to(:error)
          end
        end
      end
    end
  end
end unless ENV['CI']

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
json-ld-3.2.4 spec/suite_expand_spec.rb
json-ld-3.2.3 spec/suite_expand_spec.rb
json-ld-3.2.2 spec/suite_expand_spec.rb
json-ld-3.2.1 spec/suite_expand_spec.rb
json-ld-3.2.0 spec/suite_expand_spec.rb
json-ld-3.1.10 spec/suite_expand_spec.rb
json-ld-3.1.9 spec/suite_expand_spec.rb
json-ld-3.1.8 spec/suite_expand_spec.rb
json-ld-3.1.7 spec/suite_expand_spec.rb
json-ld-3.1.6 spec/suite_expand_spec.rb
json-ld-3.1.5 spec/suite_expand_spec.rb
json-ld-3.1.4 spec/suite_expand_spec.rb
json-ld-3.1.3 spec/suite_expand_spec.rb
json-ld-3.1.2 spec/suite_expand_spec.rb