Giter Site home page Giter Site logo

mcritchlow / rdf-spec Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ruby-rdf/rdf-spec

0.0 3.0 0.0 454 KB

RDF.rb plugin that provides RSpec matchers and shared examples for RDF objects.

Home Page: http://rubygems.org/gems/rdf-spec

License: The Unlicense

Ruby 100.00%

rdf-spec's Introduction

RSpec Extensions for RDF.rb

This is an RDF.rb extension that provides RDF-specific RSpec matchers and shared examples for Ruby projects that use RDF.rb and RSpec.

Gem Version Build Status Coverage Status

Documentation

  • {RDF::Spec}
    • {RDF::Spec::Matchers}

Shared specs are implemented in modules which typically require that an instance be defined in a class variable in a before(:each) block. For example, an class implementing RDF::Countable could test this behavior by defining @countable as an instance variable and including RDF_Countable as follows:

describe RDF::Enumerable do
  before :each do
    # The available reference implementations are `RDF::Repository` and
    # `RDF::Graph`, but a plain Ruby array will do fine as well:
    @enumerable = RDF::Spec.quads.dup.extend(RDF::Enumerable)
  end

  # @see lib/rdf/spec/enumerable.rb in rdf-spec
  include RDF_Enumerable
end

Note that in most cases, if the instance is empty and mutable, the appropriate statements will be added. When testing a non-mutable instance, the data must be pre-loaded.

Dependencies

Installation

The recommended installation method is via RubyGems. To install the latest official release of the RDF::Spec gem, do:

% [sudo] gem install rdf-spec

Download

To get a local working copy of the development repository, do:

% git clone git://github.com/ruby-rdf/rdf-spec.git

Alternatively, download the latest development version as a tarball as follows:

% wget http://github.com/ruby-rdf/rdf-spec/tarball/master

Authors

Contributors

Contributing

  • Do your best to adhere to the existing coding conventions and idioms.
  • Don't use hard tabs, and don't leave trailing whitespace on any line.
  • Do refer to the RubySpec Style Guide for best practices.
  • Don't touch the .gemspec or VERSION files. If you need to change them, do so on your private branch only.
  • Do feel free to add yourself to the CONTRIBUTORS file and the corresponding list in the the README. Alphabetical order applies.
  • Don't touch the AUTHORS file. If your contributions are significant enough, be assured we will eventually add you in there.
  • Do note that in order for us to merge any non-trivial changes (as a rule of thumb, additions larger than about 15 lines of code), we need an explicit public domain dedication on record from you.

License

This is free and unencumbered public domain software. For more information, see http://unlicense.org/ or the accompanying {file:UNLICENSE} file.

rdf-spec's People

Contributors

gkellogg avatar artob avatar bhuga avatar jfieber avatar cbeer avatar dwbutler avatar kna avatar pius avatar

Watchers

Matthew Critchlow avatar James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.