spec/spec_helper.rb in rdf-rdfa-0.2.2 vs spec/spec_helper.rb in rdf-rdfa-0.3.0

- old
+ new

@@ -1,13 +1,14 @@ $:.unshift(File.join(File.dirname(__FILE__), '..', 'lib')) $:.unshift File.dirname(__FILE__) require 'rubygems' -require 'spec' +require 'rspec' require 'bigdecimal' # XXX Remove Me require 'rdf/rdfa' require 'rdf/spec' +require 'rdf/spec/matchers' require 'rdf/isomorphic' begin require 'rdf/redland' $redland_enabled = true @@ -34,12 +35,20 @@ end end end end -Spec::Runner.configure do |config| - config.include(RDF::Spec::Matchers) +::RSpec.configure do |c| + c.filter_run :focus => true + c.run_all_when_everything_filtered = true + c.exclusion_filter = { + :ruby => lambda { |version| !(RUBY_VERSION.to_s =~ /^#{version.to_s}/) }, + } + c.include(Matchers) + c.include(RDF::Spec::Matchers) end + +TMP_DIR = File.join(File.expand_path(File.dirname(__FILE__)), "tmp") # Heuristically detect the input stream def detect_format(stream) # Got to look into the file to see if stream.is_a?(IO) || stream.is_a?(StringIO)