Skip to content
Browse files

Set up SimpleCov to merge results of adapter-specific tests

  • Loading branch information...
1 parent 4d3b04e commit ed9db90788f3849fffd425d0dbd33d4367840f24 @laserlemon committed Mar 6, 2013
Showing with 14 additions and 5 deletions.
  1. +14 −5 spec/spec_helper.rb
View
19 spec/spec_helper.rb
@@ -1,15 +1,24 @@
+require "simplecov"
require "coveralls"
-Coveralls.wear!
+
+SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
+ SimpleCov::Formatter::HTMLFormatter,
+ Coveralls::SimpleCov::Formatter
+]
+
+adapter, gemfile = ENV["ADAPTER"], ENV["BUNDLE_GEMFILE"]
+adapter ||= gemfile && gemfile[%r(gemfiles/(.*?)/)] && $1
+
+SimpleCov.command_name(adapter)
+SimpleCov.start do
+ add_filter("spec")
+end
require "periscope"
Dir["./spec/shared/*.rb"].each { |f| require f }
Dir["./spec/support/*.rb"].each { |f| require f }
-# Respect explicitly set adapter or infer based on active gemfile
-adapter, gemfile = ENV["ADAPTER"], ENV["BUNDLE_GEMFILE"]
-adapter ||= gemfile && gemfile[%r(gemfiles/(.*?)/)] && $1
-
if adapter
require "periscope/adapters/#{adapter}"
Dir["./spec/support/adapters/#{adapter}/*.rb"].each { |f| require f }

0 comments on commit ed9db90

Please sign in to comment.
Something went wrong with that request. Please try again.