From c9946da19380031890807e08df1828f6cdecabd4 Mon Sep 17 00:00:00 2001 From: Josh Holtrop Date: Tue, 23 May 2017 15:55:28 -0400 Subject: [PATCH] integration tests: only pass -f when a specific rsconsfile is specified --- spec/build_tests_spec.rb | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/spec/build_tests_spec.rb b/spec/build_tests_spec.rb index 7ba5e95..0b6141c 100644 --- a/spec/build_tests_spec.rb +++ b/spec/build_tests_spec.rb @@ -55,9 +55,14 @@ describe Rscons do end def run_test(options = {}) - rsconsfile = options[:rsconsfile] || "Rsconsfile" + rsconsfile_args = + if options[:rsconsfile] + %W[-f #{options[:rsconsfile]}] + else + [] + end rscons_args = options[:rscons_args] || [] - command = %W[ruby -I. -r _simplecov_setup #{@owd}/bin/rscons -f #{rsconsfile}] + rscons_args + command = %W[ruby -I. -r _simplecov_setup #{@owd}/bin/rscons] + rsconsfile_args + rscons_args @statics[:build_test_id] ||= 0 @statics[:build_test_id] += 1 command_name = "b#{@statics[:build_test_id]}"