Do not run simplecov on dspec specs
This commit is contained in:
1 parent
556c821cc6
commit
87a6d9f04f
3 files changed
+41
-34
No files matched your search
+15
-13
@@ -118,21 +118,23 @@ describe Rscons do
|
||||
command_name = "#{command_prefix}#{@statics[:build_test_id]}"
|
||||
File.open("_simplecov_setup.rb", "w") do |fh|
|
||||
fh.puts <<EOF
|
||||
require "bundler"
|
||||
Bundler.setup
|
||||
require "simplecov"
|
||||
class MyFormatter
|
||||
def format(*args)
|
||||
unless ENV["dist_specs"]
|
||||
require "bundler"
|
||||
Bundler.setup
|
||||
require "simplecov"
|
||||
class MyFormatter
|
||||
def format(*args)
|
||||
end
|
||||
end
|
||||
end
|
||||
SimpleCov.start do
|
||||
root(#{@owd.inspect})
|
||||
command_name(#{command_name.inspect})
|
||||
filters.clear
|
||||
add_filter do |src|
|
||||
!(src.filename[SimpleCov.root])
|
||||
SimpleCov.start do
|
||||
root(#{@owd.inspect})
|
||||
command_name(#{command_name.inspect})
|
||||
filters.clear
|
||||
add_filter do |src|
|
||||
!(src.filename[SimpleCov.root])
|
||||
end
|
||||
formatter(MyFormatter)
|
||||
end
|
||||
formatter(MyFormatter)
|
||||
end
|
||||
# force color off
|
||||
ENV["TERM"] = nil
|
||||
|
||||
+20
-20
@@ -1,25 +1,25 @@
|
||||
require "simplecov"
|
||||
|
||||
SimpleCov.start do
|
||||
add_filter "/spec/"
|
||||
add_filter "/.bundle/"
|
||||
if ENV["partial_specs"]
|
||||
command_name "RSpec-partial"
|
||||
else
|
||||
command_name "RSpec"
|
||||
end
|
||||
if ENV["dist_specs"]
|
||||
add_filter "/bin/"
|
||||
add_filter "/lib/"
|
||||
else
|
||||
add_filter "test/rscons.rb"
|
||||
end
|
||||
project_name "Rscons"
|
||||
merge_timeout 3600
|
||||
end
|
||||
|
||||
if ENV["dist_specs"]
|
||||
require_relative "../test/rscons"
|
||||
else
|
||||
require "simplecov"
|
||||
|
||||
SimpleCov.start do
|
||||
add_filter "/spec/"
|
||||
add_filter "/.bundle/"
|
||||
if ENV["partial_specs"]
|
||||
command_name "RSpec-partial"
|
||||
else
|
||||
command_name "RSpec"
|
||||
end
|
||||
if ENV["dist_specs"]
|
||||
add_filter "/bin/"
|
||||
add_filter "/lib/"
|
||||
else
|
||||
add_filter "test/rscons.rb"
|
||||
end
|
||||
project_name "Rscons"
|
||||
merge_timeout 3600
|
||||
end
|
||||
|
||||
require "rscons"
|
||||
end
|
||||
Reference in new issue
Block a user