spec/spec_helper.rb in rpairtree-0.2.0 vs spec/spec_helper.rb in rpairtree-0.3.0
- old
+ new
@@ -1,16 +1,22 @@
$LOAD_PATH.unshift(File.dirname(__FILE__))
-$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
+$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), "..", "lib"))
-require 'bundler/setup'
-require 'rspec'
+require "bundler/setup"
+require "rspec"
-if ENV['COVERAGE'] and RUBY_VERSION =~ /^1.9/
- require 'simplecov'
- SimpleCov.start
+require "simplecov"
+require "simplecov-lcov"
+SimpleCov::Formatter::LcovFormatter.config do |c|
+ c.report_with_single_file = true
+ c.single_report_path = "coverage/lcov.info"
end
+SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter.new([
+ SimpleCov::Formatter::HTMLFormatter,
+ SimpleCov::Formatter::LcovFormatter
+])
+SimpleCov.start
-require 'pairtree'
+require "pairtree"
RSpec.configure do |config|
-
end