-
Notifications
You must be signed in to change notification settings - Fork 7
/
spec_helper.rb
42 lines (38 loc) · 983 Bytes
/
spec_helper.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
$:.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
$:.unshift File.dirname(__FILE__)
require "bundler/setup"
require 'rspec'
require 'rdf/isomorphic'
require 'rdf/ntriples'
require 'rdf/turtle'
require 'rdf/spec'
require 'rdf/spec/matchers'
require 'matchers'
begin
require 'nokogiri'
rescue LoadError
:rexml
end
begin
require 'simplecov'
require 'simplecov-lcov'
SimpleCov::Formatter::LcovFormatter.config do |config|
#Coveralls is coverage by default/lcov. Send info results
config.report_with_single_file = true
config.single_report_path = 'coverage/lcov.info'
end
SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter.new([
SimpleCov::Formatter::HTMLFormatter,
SimpleCov::Formatter::LcovFormatter
])
SimpleCov.start do
add_filter "/spec/"
end
rescue LoadError
end
require 'rdf/rdfxml'
::RSpec.configure do |c|
c.filter_run focus: true
c.run_all_when_everything_filtered = true
c.include(RDF::Spec::Matchers)
end