Skip to content

Commit 121eb0d

Browse files
committed
Added simplecov
I've started to use simplecov on json-schema to find gaps in the test coverage. This might be useful to other developers too, so I thought it would be useful to share the simplecov config I'm using
1 parent 9dc5d79 commit 121eb0d

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ pkg
55
/Gemfile.lock
66
.bundle
77
.idea
8+
/coverage

Gemfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ source "https://rubygems.org"
33
gemspec
44

55
gem "json", ">= 1.7", :platforms => :mri_19
6+
gem 'simplecov', :require => false

test/support/test_helper.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
if ENV['COVERAGE']
2+
require 'simplecov'
3+
SimpleCov.start do
4+
add_filter '/test/'
5+
end
6+
end
7+
18
require 'minitest/autorun'
29
require 'webmock/minitest'
310

0 commit comments

Comments
 (0)