Module: RDF::Spec

Defined in:
lib/rdf/spec.rb,
lib/rdf/spec/version.rb,
lib/rdf/spec/matchers.rb

Overview

RDF::Spec provides RSpec extensions for RDF.rb.

Examples:

Requiring the RDF::Spec module

require 'rdf/spec'

Including the matchers in spec/spec_helper.rb

require 'rdf/spec'

RSpec.configure do |config|
  config.include(RDF::Spec::Matchers)
end

Using the shared examples for RDF::Enumerable

require 'rdf/spec/enumerable'

describe RDF::Enumerable do
  before :each do
    @statements = RDF::NTriples::Reader.new(File.open("etc/doap.nt")).to_a
    @enumerable = @statements.dup.extend(RDF::Enumerable)
  end

  it_should_behave_like RDF_Enumerable
end

Using the shared examples for RDF::Repository

require 'rdf/spec/repository'

describe RDF::Repository do
  before :each do
    @repository = RDF::Repository.new
  end

  it_should_behave_like RDF_Repository
end

See Also:

Author:

Defined Under Namespace

Modules: Matchers, VERSION