Skip to content

Commit 11fa272

Browse files
committed
Record coverage information during spec runs
We want to start improving our test coverage. In order to do that, we should be reporting coverage information to Coveralls for Travis builds, otherwise we should display it in the console when developing locally.
1 parent 715db5b commit 11fa272

File tree

4 files changed

+17
-0
lines changed

4 files changed

+17
-0
lines changed

Diff for: .gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
.bundle
22
Gemfile.lock
3+
/coverage
34
/pkg
45

56
# YARD

Diff for: .simplecov

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
SimpleCov.start do
2+
add_filter '/bin/'
3+
add_filter '/spec/'
4+
end

Diff for: Gemfile

+2
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,5 @@ gem 'overcommit', '0.26.0'
88
# Pin tool versions (which are executed by Overcommit) for Travis builds
99
gem 'rubocop', '0.32.1'
1010
gem 'travis', '~> 1.7'
11+
12+
gem 'coveralls'

Diff for: spec/spec_helper.rb

+10
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
if ENV['TRAVIS']
2+
# When running in Travis, report coverage stats to Coveralls.
3+
require 'coveralls'
4+
Coveralls.wear!
5+
else
6+
# Otherwise render coverage information in coverage/index.html and display
7+
# coverage percentage in the console.
8+
require 'simplecov'
9+
end
10+
111
require 'scss_lint'
212

313
Dir[File.dirname(__FILE__) + '/support/**/*.rb'].each { |f| require f }

0 commit comments

Comments
 (0)