spec/pragmatic_context_spec.rb in active-triples-0.8.1 vs spec/pragmatic_context_spec.rb in active-triples-0.8.2

- old
+ new

@@ -1,38 +1,40 @@ +# frozen_string_literal: true require 'spec_helper' require 'pragmatic_context' describe 'PragmaticContext integration' do before do class DummyLicense include ActiveTriples::RDFSource include PragmaticContext::Contextualizable - property :title, :predicate => RDF::DC.title + property :title, :predicate => RDF::Vocab::DC.title - contextualize :title, :as => RDF::DC.title.to_s + contextualize :title, :as => RDF::Vocab::DC.title.to_s end class DummyResource include ActiveTriples::RDFSource include PragmaticContext::Contextualizable configure :type => RDF::URI('http://example.org/SomeClass') - property :license, :predicate => RDF::DC.license, :class_name => DummyLicense - property :title, :predicate => RDF::DC.title + property :license, :predicate => RDF::Vocab::DC.license, + :class_name => DummyLicense + property :title, :predicate => RDF::Vocab::DC.title - contextualize :title, :as => RDF::DC.title.to_s - contextualize :license, :as => RDF::DC.license.to_s + contextualize :title, :as => RDF::Vocab::DC.title.to_s + contextualize :license, :as => RDF::Vocab::DC.license.to_s end license.title = 'cc' subject.title = 'my resource' subject.license = license subject.license << RDF::Literal('Creative Commons') end after do - Object.send(:remove_const, "DummyResource") if Object - Object.send(:remove_const, "DummyLicense") if Object + Object.send(:remove_const, "DummyResource") + Object.send(:remove_const, "DummyLicense") end subject { DummyResource.new('http://example.org/test') } let(:license) { DummyLicense.new }