Skip to content

Commit 3b51360

Browse files
author
Vladimir Dobriakov
committed
Move simplecov setup to test_helper to try compatibility with codeclimate
1 parent 606bc2e commit 3b51360

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

Rakefile

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,6 @@ Rake::TestTask.new(:test) do |t|
88
t.verbose = true
99
t.warning = true
1010
t.test_files = FileList["test/**/*_test.rb"]
11-
12-
# Require and start simplecov BEFORE minitest/autorun loads ./lib to get correct test results.
13-
# Otherwise lot of executed lines are not detect.
14-
require 'simplecov'
15-
SimpleCov.start do
16-
add_filter 'test'
17-
end
1811
end
1912

2013
Rake::RDocTask.new do |rdoc|

test/test_helper.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
# Require and start simplecov BEFORE minitest/autorun loads ./lib to get correct test results.
2+
# Otherwise lot of executed lines are not detected.
3+
require 'simplecov'
4+
SimpleCov.start do
5+
add_filter 'test'
6+
end
7+
18
require 'minitest/autorun'
29

310
class << Minitest::Test

0 commit comments

Comments
 (0)