Sha256: e8ed053fb4293231fb2ac16b7ddf61f1c74fb954442db571226e6491c5e37379
Contents?: true
Size: 1017 Bytes
Versions: 6
Compression:
Stored size: 1017 Bytes
Contents
require "spec_helper" describe ActiveTriples::Configurable do before do class DummyConfigurable extend ActiveTriples::Configurable end end after do Object.send(:remove_const, "DummyConfigurable") end describe '#configure' do before do DummyConfigurable.configure base_uri: "http://example.org/base", type: RDF::RDFS.Class, rdf_label: RDF::DC.title end it 'should set a base uri' do expect(DummyConfigurable.base_uri).to eq "http://example.org/base" end it 'should set an rdf_label' do expect(DummyConfigurable.rdf_label).to eq RDF::DC.title end it 'should set a type' do expect(DummyConfigurable.type).to eq RDF::RDFS.Class end end describe '#rdf_type' do it "should set the type the old way" do DummyConfigurable.should_receive(:configure).with(type: RDF::RDFS.Class).and_call_original DummyConfigurable.rdf_type(RDF::RDFS.Class) expect(DummyConfigurable.type).to eq RDF::RDFS.Class end end end
Version data entries
6 entries across 6 versions & 1 rubygems