Skip to content

Commit

Permalink
Report test coverage with coveralls
Browse files Browse the repository at this point in the history
  • Loading branch information
jawshooah committed Mar 18, 2015
1 parent ca5e1d6 commit 37f42f9
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .simplecov
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
SimpleCov.start do
add_filter 'spec/'
add_filter 'test/'
end
5 changes: 4 additions & 1 deletion Rakefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
require 'coveralls/rake/task'
require 'rake/testtask'
require 'rspec/core/rake_task'
require 'rubocop/rake_task'

Coveralls::RakeTask.new

Rake::TestTask.new do |t|
t.name = 'minitest'
t.pattern = "test/**/*_test.rb"
Expand All @@ -15,7 +18,7 @@ RuboCop::RakeTask.new do |t|
t.options = ['--force-exclusion']
end

task :test => [:minitest, :spec]
task :test => [:minitest, :spec, 'coveralls:push']
task :default => [:test, :rubocop]

task :console do
Expand Down
3 changes: 3 additions & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
require 'coveralls'

Coveralls.wear_merged!

# just in case
if RUBY_VERSION.to_i < 2
Expand Down
1 change: 1 addition & 0 deletions test/layout_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
.gitignore
.rspec
.rubocop.yml
.simplecov
.travis.yml
CONDUCT.md
CONTRIBUTING.md
Expand Down
3 changes: 3 additions & 0 deletions test/test_helper.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
require 'bundler'
require 'bundler/setup'
require 'coveralls'

Coveralls.wear_merged!

# just in case
if RUBY_VERSION.to_i < 2
Expand Down

0 comments on commit 37f42f9

Please sign in to comment.