Skip to content

Commit 37f42f9

Browse files
committed
Report test coverage with coveralls
1 parent ca5e1d6 commit 37f42f9

File tree

5 files changed

+15
-1
lines changed

5 files changed

+15
-1
lines changed

.simplecov

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

Rakefile

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
1+
require 'coveralls/rake/task'
12
require 'rake/testtask'
23
require 'rspec/core/rake_task'
34
require 'rubocop/rake_task'
45

6+
Coveralls::RakeTask.new
7+
58
Rake::TestTask.new do |t|
69
t.name = 'minitest'
710
t.pattern = "test/**/*_test.rb"
@@ -15,7 +18,7 @@ RuboCop::RakeTask.new do |t|
1518
t.options = ['--force-exclusion']
1619
end
1720

18-
task :test => [:minitest, :spec]
21+
task :test => [:minitest, :spec, 'coveralls:push']
1922
task :default => [:test, :rubocop]
2023

2124
task :console do

spec/spec_helper.rb

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
require 'coveralls'
2+
3+
Coveralls.wear_merged!
14

25
# just in case
36
if RUBY_VERSION.to_i < 2

test/layout_test.rb

+1
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
.gitignore
4040
.rspec
4141
.rubocop.yml
42+
.simplecov
4243
.travis.yml
4344
CONDUCT.md
4445
CONTRIBUTING.md

test/test_helper.rb

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
require 'bundler'
22
require 'bundler/setup'
3+
require 'coveralls'
4+
5+
Coveralls.wear_merged!
36

47
# just in case
58
if RUBY_VERSION.to_i < 2

0 commit comments

Comments
 (0)