From eb1b81936b49f8022c0d0c65b18ab785d7b9ee09 Mon Sep 17 00:00:00 2001 From: Emily Samp Date: Tue, 7 Feb 2023 13:00:57 -0600 Subject: [PATCH] Check for existence of parser test file Check that the file exists before adding it to Rake's list of test files. If somebody hasn't pulled the submodule, the tests will not raise an exception. --- Rakefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Rakefile b/Rakefile index cb96e7bf..7c1358cd 100644 --- a/Rakefile +++ b/Rakefile @@ -13,7 +13,8 @@ Rake::TestTask.new(:test) do |t| test_files = FileList["test/**/*_test.rb"] # This is a big test file from the parser gem that tests its functionality. - test_files << "test/suites/parser/test/test_parser.rb" + parser_test_file = "test/suites/parser/test/test_parser.rb" + test_files << parser_test_file if File.exist?(parser_test_file) t.test_files = test_files end