Improve simplecov result merging
This commit is contained in:
parent
f09e722691
commit
cd19ca4eda
4 changed files with 14 additions and 8 deletions
|
@ -1,5 +1,9 @@
|
||||||
require 'spec_helper'
|
require 'spec_helper'
|
||||||
|
|
||||||
|
if defined? SimpleCov
|
||||||
|
SimpleCov.command_name 'acceptance'
|
||||||
|
end
|
||||||
|
|
||||||
require 'vagrant'
|
require 'vagrant'
|
||||||
require 'vagrant-lxc'
|
require 'vagrant-lxc'
|
||||||
|
|
||||||
|
|
|
@ -2,14 +2,8 @@ if ENV['COVERAGE']
|
||||||
require 'simplecov'
|
require 'simplecov'
|
||||||
require 'coveralls'
|
require 'coveralls'
|
||||||
|
|
||||||
SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
|
SimpleCov.start { add_filter '/spec/' }
|
||||||
SimpleCov::Formatter::HTMLFormatter,
|
SimpleCov.merge_timeout 300
|
||||||
Coveralls::SimpleCov::Formatter
|
|
||||||
]
|
|
||||||
|
|
||||||
SimpleCov.start do
|
|
||||||
add_filter { |source_file| source_file.filename =~ /\/spec\/support/ }
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
require 'bundler/setup'
|
require 'bundler/setup'
|
||||||
|
|
|
@ -1,5 +1,9 @@
|
||||||
require 'spec_helper'
|
require 'spec_helper'
|
||||||
|
|
||||||
|
if defined? SimpleCov
|
||||||
|
SimpleCov.command_name 'unit'
|
||||||
|
end
|
||||||
|
|
||||||
RSpec.configure do |config|
|
RSpec.configure do |config|
|
||||||
config.include RSpec::Fire
|
config.include RSpec::Fire
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,15 @@
|
||||||
begin
|
begin
|
||||||
require 'rspec/core/rake_task'
|
require 'rspec/core/rake_task'
|
||||||
|
require 'coveralls/rake/task'
|
||||||
|
|
||||||
desc 'Run all specs'
|
desc 'Run all specs'
|
||||||
task :spec => ['spec:unit', 'spec:acceptance']
|
task :spec => ['spec:unit', 'spec:acceptance']
|
||||||
|
|
||||||
desc 'Default task which runs all specs with code coverage enabled'
|
desc 'Default task which runs all specs with code coverage enabled'
|
||||||
task :default => ['spec:set_coverage', 'spec']
|
task :default => ['spec:set_coverage', 'spec']
|
||||||
|
|
||||||
|
Coveralls::RakeTask.new
|
||||||
|
task :ci => [:default, 'coveralls:push']
|
||||||
rescue LoadError; end
|
rescue LoadError; end
|
||||||
|
|
||||||
namespace :spec do
|
namespace :spec do
|
||||||
|
|
Loading…
Reference in a new issue