Skip to content

Commit

Permalink
Enable test coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
jodosha committed Jan 27, 2014
1 parent 533a0c1 commit 6f73962
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Rakefile
Expand Up @@ -7,4 +7,11 @@ Rake::TestTask.new do |t|
t.libs.push 'test'
end

namespace :test do
task :coverage do
ENV['COVERAGE'] = 'true'
Rake::Task['test'].invoke
end
end

task default: :test
16 changes: 16 additions & 0 deletions test/test_helper.rb
@@ -1,5 +1,21 @@
require 'rubygems'
require 'bundler/setup'

if ENV['COVERAGE'] == 'true'
require 'simplecov'
require 'coveralls'

SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
SimpleCov::Formatter::HTMLFormatter,
Coveralls::SimpleCov::Formatter
]

SimpleCov.start do
command_name 'test'
add_filter 'test'
end
end

require 'minitest/autorun'
$:.unshift 'lib'
require 'lotus/controller'
Expand Down

0 comments on commit 6f73962

Please sign in to comment.