Skip to content
This repository has been archived by the owner on Nov 23, 2020. It is now read-only.

Commit

Permalink
Only define SimpleCov profile if nil
Browse files Browse the repository at this point in the history
Upgrade SimpleCov.

On Ruby 2.0.0 specs fail because SimpleCov has already defined the
profile.

Only define the 'gem' profile if it has not been previously defined,
ie the first run.
  • Loading branch information
surminus committed Jun 11, 2017
1 parent 111d52a commit 5b9b8af
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
10 changes: 6 additions & 4 deletions spec/spec_helper.rb
Expand Up @@ -9,11 +9,13 @@ def output_message(_message)
end
end

SimpleCov.adapters.define 'gem' do
add_filter '/spec/'
add_filter '/vendor/'
if SimpleCov.profiles[:gem].nil?
SimpleCov.profiles.define 'gem' do
add_filter '/spec/'
add_filter '/vendor/'

add_group 'Libraries', '/lib/'
add_group 'Libraries', '/lib/'
end
end

SimpleCov.minimum_coverage(84)
Expand Down
2 changes: 1 addition & 1 deletion vcloud-core.gemspec
Expand Up @@ -31,6 +31,6 @@ Gem::Specification.new do |s|
s.add_development_dependency 'rake', '>= 12'
s.add_development_dependency 'rspec', '>= 3.6'
s.add_development_dependency 'rubocop', '~> 0.49.1'
s.add_development_dependency 'simplecov', '~> 0.7.1'
s.add_development_dependency 'simplecov', '~> 0.14.1'
s.add_development_dependency 'vcloud-tools-tester'
end

0 comments on commit 5b9b8af

Please sign in to comment.