Sha256: 979dee7a23e8ecc7be5c40b2aa7bf855b7175fab047f316bdd1ba8401c596fa5

Contents?: true

Size: 1.26 KB

Versions: 8

Compression:

Stored size: 1.26 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}flatten-manifest.jsonld")
    describe m.name do
      m.entries.each do |t|
        t.options[:remap_bnodes] = %w(#t0045).include?(t.property('@id'))

        specify "#{t.property('@id')}: #{t.name} unordered#{' (negative test)' unless t.positiveTest?}" do
          t.options[:ordered] = false
          if %w(#t0005).include?(t.property('@id'))
            expect{t.run self}.to write("Terms beginning with '@' are reserved for future use").to(:error)
          else
            expect {t.run self}.not_to write.to(:error)
          end
        end

        # Skip ordered tests when remapping bnodes
        next if t.options[:remap_bnodes]
        specify "#{t.property('@id')}: #{t.name} ordered#{' (negative test)' unless t.positiveTest?}" do
          t.options[:ordered] = true
          if %w(#t0005).include?(t.property('@id'))
            expect{t.run self}.to write("Terms 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

8 entries across 8 versions & 1 rubygems

Version Path
json-ld-3.2.4 spec/suite_flatten_spec.rb
json-ld-3.2.3 spec/suite_flatten_spec.rb
json-ld-3.2.2 spec/suite_flatten_spec.rb
json-ld-3.2.1 spec/suite_flatten_spec.rb
json-ld-3.2.0 spec/suite_flatten_spec.rb
json-ld-3.1.10 spec/suite_flatten_spec.rb
json-ld-3.1.9 spec/suite_flatten_spec.rb
json-ld-3.1.8 spec/suite_flatten_spec.rb