Improve simplecov result merging

This commit is contained in:
Fabio Rehm 2013-04-20 17:38:01 -03:00
parent f09e722691
commit cd19ca4eda
4 changed files with 14 additions and 8 deletions

View file

@ -1,5 +1,9 @@
require 'spec_helper'
if defined? SimpleCov
SimpleCov.command_name 'acceptance'
end
require 'vagrant'
require 'vagrant-lxc'

View file

@ -2,14 +2,8 @@ if ENV['COVERAGE']
require 'simplecov'
require 'coveralls'
SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
SimpleCov::Formatter::HTMLFormatter,
Coveralls::SimpleCov::Formatter
]
SimpleCov.start do
add_filter { |source_file| source_file.filename =~ /\/spec\/support/ }
end
SimpleCov.start { add_filter '/spec/' }
SimpleCov.merge_timeout 300
end
require 'bundler/setup'

View file

@ -1,5 +1,9 @@
require 'spec_helper'
if defined? SimpleCov
SimpleCov.command_name 'unit'
end
RSpec.configure do |config|
config.include RSpec::Fire

View file

@ -1,11 +1,15 @@
begin
require 'rspec/core/rake_task'
require 'coveralls/rake/task'
desc 'Run all specs'
task :spec => ['spec:unit', 'spec:acceptance']
desc 'Default task which runs all specs with code coverage enabled'
task :default => ['spec:set_coverage', 'spec']
Coveralls::RakeTask.new
task :ci => [:default, 'coveralls:push']
rescue LoadError; end
namespace :spec do