From bfbbc19728ed0828bfacc6e2a301aa334af6226d Mon Sep 17 00:00:00 2001 From: Josh Holtrop Date: Mon, 22 May 2017 11:19:55 -0400 Subject: [PATCH] fix simplecov setup to get coverage for integration build tests --- spec/build_tests_spec.rb | 15 ++++++++++----- spec/spec_helper.rb | 2 ++ 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/spec/build_tests_spec.rb b/spec/build_tests_spec.rb index 3d150e1..8ab2d4b 100644 --- a/spec/build_tests_spec.rb +++ b/spec/build_tests_spec.rb @@ -57,12 +57,11 @@ describe Rscons do def run_test(options = {}) rsconsfile = options[:rsconsfile] || "Rsconsfile" rscons_args = options[:rscons_args] || [] - command = %w[rscons -f _build_test.rb] + rscons_args + command = %W[ruby -I. -r _simplecov_setup #{@owd}/bin/rscons -f #{rsconsfile}] + rscons_args @statics[:build_test_id] ||= 0 @statics[:build_test_id] += 1 command_name = "b#{@statics[:build_test_id]}" - rsconsfile_contents = File.read(rsconsfile) - File.open("_build_test.rb", "w") do |fh| + File.open("_simplecov_setup.rb", "w") do |fh| fh.puts <