From ec7720e3fbf6fd0b0f61adc2198716c9d138b2b2 Mon Sep 17 00:00:00 2001 From: Ryan Hawkins Date: Thu, 22 Jan 2026 22:21:46 +0000 Subject: [PATCH] Fix runnable detection In PR #229, we changed the runnable detection logic for it, describe, its, etc. to look inside of strings for their content so that we don't pass along their quotations to the command line. However, in doing so, tests that use modules, classes, or symbols were no longer being detected. Add back detection for those, and a catch-all to make sure we don't miss any other cases (which is what we had before). --- languages/ruby/runnables.scm | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/languages/ruby/runnables.scm b/languages/ruby/runnables.scm index 16d0ab5..75ca9b1 100644 --- a/languages/ruby/runnables.scm +++ b/languages/ruby/runnables.scm @@ -44,8 +44,15 @@ "include_examples") arguments: (argument_list . - (_ - (string_content) @name @RUBY_TEST_NAME))) @_ruby-test + [ + (_ + (string_content) @name @RUBY_TEST_NAME) + (constant) @name @RUBY_TEST_NAME + (scope_resolution) @name @RUBY_TEST_NAME + (simple_symbol) @name @RUBY_TEST_NAME + ; Catch-all to make sure we don't miss any cases (numbers, arrays, dynamically generated names, etc) + (_) @name @RUBY_TEST_NAME + ])) @_ruby-test (#set! tag ruby-test)) ; Examples (one-liner syntax)