From 9e128477b138dae525d3410c4149bde0a020880f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Fri, 21 Nov 2025 19:09:38 +0100 Subject: [PATCH] Ignore "Resolving dependencies..." message by Bundler This message might appear when Bundler is resolving its dependencies for the first time. Make sure it does not influece test results. Fixes #110 --- test/shoulda/test_framework_detection_test.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/shoulda/test_framework_detection_test.rb b/test/shoulda/test_framework_detection_test.rb index 06094f1..a05c2dc 100644 --- a/test/shoulda/test_framework_detection_test.rb +++ b/test/shoulda/test_framework_detection_test.rb @@ -44,7 +44,10 @@ def assert_test_cases_are_detected(*expected_test_cases) options = expected_test_cases.last.is_a?(Hash) ? expected_test_cases.pop : {} setup = options[:setup] || "" output = execute(file_that_detects_test_framework_test_cases([setup])) - actual_test_cases = output.split("\n").first.split(", ") + output_lines = output.split("\n") + # Ignore Bundler output if present + output_lines.shift if output_lines.first =~ /Resolving dependencies.../ + actual_test_cases = output_lines.first.split(", ") assert_equal expected_test_cases, actual_test_cases end