Sha256: 59061dbb1adacba185fa84773201c193055798db8126be9722f4ecadbd73739f
Contents?: true
Size: 773 Bytes
Versions: 2
Compression:
Stored size: 773 Bytes
Contents
RSpec.describe RDF::Vocab do describe ".generate" do let(:source) { File.expand_path("../../fixtures/dcterms.rdf", __FILE__) } before do allow(RDF::Vocab).to receive(:config) do { "test" => { "class_name" => "Test", "source" => source, "uri" => "http://purl.org/dc/terms/" } } end StringIO.open do |strio| RDF::Vocab.generate("test", strio) strio.rewind eval(strio.read) end end after { RDF.send(:remove_const, :Test) } it "should generate the vocabulary based on the config" do expect(RDF::Test < ::RDF::StrictVocabulary("http://purl.org/dc/terms/")).to be true expect(RDF::Test.creator).to be_a(RDF::Term) end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
rdf-vocab-0.2.0 | spec/unit/rdf_vocab_spec.rb |
rdf-vocab-0.1.0 | spec/unit/rdf_vocab_spec.rb |