Skip to content

Commit 4c8315b

Browse files
committed
Fix SimpleCov load order to track all application code
Move SimpleCov.start before any application requires so coverage tracking captures all loaded files.
1 parent aee1edd commit 4c8315b

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

test/abstract_test.rb

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
11
require 'bundler/setup'
2-
require 'fileutils'
3-
require 'minitest/autorun'
4-
Minitest.load_plugins
5-
6-
require 'ruby-bindgen/config'
72

83
if ENV['COVERAGE']
94
require 'simplecov'
@@ -17,6 +12,12 @@
1712
end
1813
end
1914

15+
require 'fileutils'
16+
require 'minitest/autorun'
17+
Minitest.load_plugins
18+
19+
require 'ruby-bindgen/config'
20+
2021
# Set up libclang path from config
2122
%w[cpp c c/clang-c].each do |dir|
2223
config = RubyBindgen::Config.new(File.join(__dir__, 'headers', dir, 'bindings.yaml'))

0 commit comments

Comments
 (0)