Skip to content

Commit fe6e178

Browse files
committed
fix spec_helper.rb
1 parent ef451f5 commit fe6e178

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

spec/unit/spec_helper.rb

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,23 @@
33
require "simplecov"
44
require "simplecov-erb"
55

6+
COV_DIR = File.expand_path("../../coverage", File.dirname(__FILE__))
7+
8+
SimpleCov.root File.expand_path("../../", File.dirname(__FILE__))
9+
SimpleCov.coverage_dir COV_DIR
10+
611
SimpleCov.formatters = [
712
SimpleCov::Formatter::HTMLFormatter,
813
SimpleCov::Formatter::ERBFormatter
914
]
15+
16+
SimpleCov.minimum_coverage 100
17+
18+
SimpleCov.at_exit do
19+
File.write("#{COV_DIR}/total-coverage.txt", SimpleCov.result.covered_percent)
20+
SimpleCov.result.format!
21+
end
22+
1023
SimpleCov.start do
1124
# don't show specs as missing coverage for themselves
1225
add_filter "/spec/"

0 commit comments

Comments
 (0)