diff --git a/lib/ruby_lsp/listeners/code_lens.rb b/lib/ruby_lsp/listeners/code_lens.rb index 2eb91487e..ec1453952 100644 --- a/lib/ruby_lsp/listeners/code_lens.rb +++ b/lib/ruby_lsp/listeners/code_lens.rb @@ -15,7 +15,7 @@ class CodeLens "bundle exec ruby" rescue Bundler::GemfileNotFound "ruby" - end + " -Itest ", + end, String, ) ACCESS_MODIFIERS = T.let([:public, :private, :protected], T::Array[Symbol]) @@ -39,7 +39,7 @@ def initialize(response_builder, global_state, uri, dispatcher) @path = T.let(uri.to_standardized_path, T.nilable(String)) # visibility_stack is a stack of [current_visibility, previous_visibility] @visibility_stack = T.let([[:public, :public]], T::Array[T::Array[T.nilable(Symbol)]]) - @group_stack = T.let([], T::Array[String]) + @group_stack = T.let([], T::Array[[Symbol, String]]) @group_id = T.let(1, Integer) @group_id_stack = T.let([], T::Array[Integer]) # We want to avoid adding code lenses for nested definitions @@ -63,15 +63,15 @@ def initialize(response_builder, global_state, uri, dispatcher) def on_class_node_enter(node) @visibility_stack.push([:public, :public]) class_name = node.constant_path.slice - @group_stack.push(class_name) + @group_stack.push([:class, class_name]) if @path && class_name.end_with?("Test") add_test_code_lens( node, name: class_name, - command: generate_test_command(group_stack: @group_stack), + command: generate_test_command(group_stack: @group_stack.map(&:last)), kind: :group, - id: generate_fully_qualified_id(group_stack: @group_stack), + id: generate_fully_qualified_id(group_stack: @group_stack.map(&:last)), ) @group_id_stack.push(@group_id) @@ -96,7 +96,7 @@ def on_def_node_enter(node) @def_depth += 1 return if @def_depth > 1 - class_name = @group_stack.last + class_name = @group_stack.last&.last return unless class_name&.end_with?("Test") visibility, _ = @visibility_stack.last @@ -106,9 +106,9 @@ def on_def_node_enter(node) add_test_code_lens( node, name: method_name, - command: generate_test_command(method_name: method_name, group_stack: @group_stack), + command: generate_test_command(method_name: method_name, group_stack: @group_stack.map(&:last)), kind: :example, - id: generate_fully_qualified_id(group_stack: @group_stack, method_name: method_name), + id: generate_fully_qualified_id(group_stack: @group_stack.map(&:last), method_name: method_name), ) end end @@ -122,9 +122,9 @@ def on_def_node_leave(node) sig { params(node: Prism::ModuleNode).void } def on_module_node_enter(node) if (path = namespace_constant_name(node)) - @group_stack.push(path) + @group_stack.push([:module, path]) else - @group_stack.push(DYNAMIC_REFERENCE_MARKER) + @group_stack.push([:module, DYNAMIC_REFERENCE_MARKER]) end end @@ -229,7 +229,10 @@ def add_test_code_lens(node, name:, command:, kind:, id: name) ).returns(String) end def generate_test_command(group_stack: [], spec_name: nil, method_name: nil) - command = BASE_COMMAND + T.must(@path) + command = BASE_COMMAND + command += " -Itest" if T.must(@path).include?("#{File::SEPARATOR}test#{File::SEPARATOR}") + command += " -Ispec" if T.must(@path).include?("#{File::SEPARATOR}spec#{File::SEPARATOR}") + command += " #{T.must(@path)}" case @global_state.test_library when "minitest" @@ -293,17 +296,21 @@ def add_spec_code_lens(node, kind:) else # Reset spec_id when entering a new group @spec_id = 0 - @group_stack.push(name) + @group_stack.push([:describe, name]) end if @path + # Remove any class or module names from the group stack. + # Specs don't include the class name in the test selector. + group_stack = @group_stack.filter_map { |type, value| value if type == :describe } + method_name = format("test_%04d_%s", @spec_id, name) if kind == :example add_test_code_lens( node, name: name, - command: generate_test_command(group_stack: @group_stack, spec_name: method_name), + command: generate_test_command(group_stack: group_stack, spec_name: method_name), kind: kind, - id: generate_fully_qualified_id(group_stack: @group_stack, method_name: method_name), + id: generate_fully_qualified_id(group_stack: group_stack, method_name: method_name), ) end end diff --git a/test/expectations/code_lens/minitest_nested_classes_and_modules.exp.json b/test/expectations/code_lens/minitest_nested_classes_and_modules.exp.json index caa0eb82b..a64bff171 100644 --- a/test/expectations/code_lens/minitest_nested_classes_and_modules.exp.json +++ b/test/expectations/code_lens/minitest_nested_classes_and_modules.exp.json @@ -17,7 +17,7 @@ "arguments": [ "/fixtures/minitest_nested_classes_and_modules.rb", "Foo::FooTest", - "bundle exec ruby -Itest /fixtures/minitest_nested_classes_and_modules.rb --name \"/^Foo::FooTest(#|::)/\"", + "bundle exec ruby /fixtures/minitest_nested_classes_and_modules.rb --name \"/^Foo::FooTest(#|::)/\"", { "start_line": 1, "start_column": 2, @@ -51,7 +51,7 @@ "arguments": [ "/fixtures/minitest_nested_classes_and_modules.rb", "Foo::FooTest", - "bundle exec ruby -Itest /fixtures/minitest_nested_classes_and_modules.rb --name \"/^Foo::FooTest(#|::)/\"", + "bundle exec ruby /fixtures/minitest_nested_classes_and_modules.rb --name \"/^Foo::FooTest(#|::)/\"", { "start_line": 1, "start_column": 2, @@ -85,7 +85,7 @@ "arguments": [ "/fixtures/minitest_nested_classes_and_modules.rb", "Foo::FooTest", - "bundle exec ruby -Itest /fixtures/minitest_nested_classes_and_modules.rb --name \"/^Foo::FooTest(#|::)/\"", + "bundle exec ruby /fixtures/minitest_nested_classes_and_modules.rb --name \"/^Foo::FooTest(#|::)/\"", { "start_line": 1, "start_column": 2, @@ -119,7 +119,7 @@ "arguments": [ "/fixtures/minitest_nested_classes_and_modules.rb", "Foo::FooTest#test_foo", - "bundle exec ruby -Itest /fixtures/minitest_nested_classes_and_modules.rb --name Foo::FooTest#test_foo", + "bundle exec ruby /fixtures/minitest_nested_classes_and_modules.rb --name Foo::FooTest#test_foo", { "start_line": 2, "start_column": 4, @@ -152,7 +152,7 @@ "arguments": [ "/fixtures/minitest_nested_classes_and_modules.rb", "Foo::FooTest#test_foo", - "bundle exec ruby -Itest /fixtures/minitest_nested_classes_and_modules.rb --name Foo::FooTest#test_foo", + "bundle exec ruby /fixtures/minitest_nested_classes_and_modules.rb --name Foo::FooTest#test_foo", { "start_line": 2, "start_column": 4, @@ -185,7 +185,7 @@ "arguments": [ "/fixtures/minitest_nested_classes_and_modules.rb", "Foo::FooTest#test_foo", - "bundle exec ruby -Itest /fixtures/minitest_nested_classes_and_modules.rb --name Foo::FooTest#test_foo", + "bundle exec ruby /fixtures/minitest_nested_classes_and_modules.rb --name Foo::FooTest#test_foo", { "start_line": 2, "start_column": 4, @@ -218,7 +218,7 @@ "arguments": [ "/fixtures/minitest_nested_classes_and_modules.rb", "Foo::FooTest#test_foo_2", - "bundle exec ruby -Itest /fixtures/minitest_nested_classes_and_modules.rb --name Foo::FooTest#test_foo_2", + "bundle exec ruby /fixtures/minitest_nested_classes_and_modules.rb --name Foo::FooTest#test_foo_2", { "start_line": 4, "start_column": 4, @@ -251,7 +251,7 @@ "arguments": [ "/fixtures/minitest_nested_classes_and_modules.rb", "Foo::FooTest#test_foo_2", - "bundle exec ruby -Itest /fixtures/minitest_nested_classes_and_modules.rb --name Foo::FooTest#test_foo_2", + "bundle exec ruby /fixtures/minitest_nested_classes_and_modules.rb --name Foo::FooTest#test_foo_2", { "start_line": 4, "start_column": 4, @@ -284,7 +284,7 @@ "arguments": [ "/fixtures/minitest_nested_classes_and_modules.rb", "Foo::FooTest#test_foo_2", - "bundle exec ruby -Itest /fixtures/minitest_nested_classes_and_modules.rb --name Foo::FooTest#test_foo_2", + "bundle exec ruby /fixtures/minitest_nested_classes_and_modules.rb --name Foo::FooTest#test_foo_2", { "start_line": 4, "start_column": 4, @@ -317,7 +317,7 @@ "arguments": [ "/fixtures/minitest_nested_classes_and_modules.rb", "Foo::Bar::BarTest", - "bundle exec ruby -Itest /fixtures/minitest_nested_classes_and_modules.rb --name \"/^Foo::Bar::BarTest(#|::)/\"", + "bundle exec ruby /fixtures/minitest_nested_classes_and_modules.rb --name \"/^Foo::Bar::BarTest(#|::)/\"", { "start_line": 8, "start_column": 4, @@ -351,7 +351,7 @@ "arguments": [ "/fixtures/minitest_nested_classes_and_modules.rb", "Foo::Bar::BarTest", - "bundle exec ruby -Itest /fixtures/minitest_nested_classes_and_modules.rb --name \"/^Foo::Bar::BarTest(#|::)/\"", + "bundle exec ruby /fixtures/minitest_nested_classes_and_modules.rb --name \"/^Foo::Bar::BarTest(#|::)/\"", { "start_line": 8, "start_column": 4, @@ -385,7 +385,7 @@ "arguments": [ "/fixtures/minitest_nested_classes_and_modules.rb", "Foo::Bar::BarTest", - "bundle exec ruby -Itest /fixtures/minitest_nested_classes_and_modules.rb --name \"/^Foo::Bar::BarTest(#|::)/\"", + "bundle exec ruby /fixtures/minitest_nested_classes_and_modules.rb --name \"/^Foo::Bar::BarTest(#|::)/\"", { "start_line": 8, "start_column": 4, @@ -419,7 +419,7 @@ "arguments": [ "/fixtures/minitest_nested_classes_and_modules.rb", "Foo::Bar::BarTest#test_bar", - "bundle exec ruby -Itest /fixtures/minitest_nested_classes_and_modules.rb --name Foo::Bar::BarTest#test_bar", + "bundle exec ruby /fixtures/minitest_nested_classes_and_modules.rb --name Foo::Bar::BarTest#test_bar", { "start_line": 9, "start_column": 6, @@ -452,7 +452,7 @@ "arguments": [ "/fixtures/minitest_nested_classes_and_modules.rb", "Foo::Bar::BarTest#test_bar", - "bundle exec ruby -Itest /fixtures/minitest_nested_classes_and_modules.rb --name Foo::Bar::BarTest#test_bar", + "bundle exec ruby /fixtures/minitest_nested_classes_and_modules.rb --name Foo::Bar::BarTest#test_bar", { "start_line": 9, "start_column": 6, @@ -485,7 +485,7 @@ "arguments": [ "/fixtures/minitest_nested_classes_and_modules.rb", "Foo::Bar::BarTest#test_bar", - "bundle exec ruby -Itest /fixtures/minitest_nested_classes_and_modules.rb --name Foo::Bar::BarTest#test_bar", + "bundle exec ruby /fixtures/minitest_nested_classes_and_modules.rb --name Foo::Bar::BarTest#test_bar", { "start_line": 9, "start_column": 6, @@ -518,7 +518,7 @@ "arguments": [ "/fixtures/minitest_nested_classes_and_modules.rb", "Foo::Bar::BarTest::Baz::BazTest", - "bundle exec ruby -Itest /fixtures/minitest_nested_classes_and_modules.rb --name \"/^Foo::Bar::BarTest::Baz::BazTest(#|::)/\"", + "bundle exec ruby /fixtures/minitest_nested_classes_and_modules.rb --name \"/^Foo::Bar::BarTest::Baz::BazTest(#|::)/\"", { "start_line": 12, "start_column": 8, @@ -552,7 +552,7 @@ "arguments": [ "/fixtures/minitest_nested_classes_and_modules.rb", "Foo::Bar::BarTest::Baz::BazTest", - "bundle exec ruby -Itest /fixtures/minitest_nested_classes_and_modules.rb --name \"/^Foo::Bar::BarTest::Baz::BazTest(#|::)/\"", + "bundle exec ruby /fixtures/minitest_nested_classes_and_modules.rb --name \"/^Foo::Bar::BarTest::Baz::BazTest(#|::)/\"", { "start_line": 12, "start_column": 8, @@ -586,7 +586,7 @@ "arguments": [ "/fixtures/minitest_nested_classes_and_modules.rb", "Foo::Bar::BarTest::Baz::BazTest", - "bundle exec ruby -Itest /fixtures/minitest_nested_classes_and_modules.rb --name \"/^Foo::Bar::BarTest::Baz::BazTest(#|::)/\"", + "bundle exec ruby /fixtures/minitest_nested_classes_and_modules.rb --name \"/^Foo::Bar::BarTest::Baz::BazTest(#|::)/\"", { "start_line": 12, "start_column": 8, @@ -620,7 +620,7 @@ "arguments": [ "/fixtures/minitest_nested_classes_and_modules.rb", "Foo::Bar::BarTest::Baz::BazTest#test_baz", - "bundle exec ruby -Itest /fixtures/minitest_nested_classes_and_modules.rb --name Foo::Bar::BarTest::Baz::BazTest#test_baz", + "bundle exec ruby /fixtures/minitest_nested_classes_and_modules.rb --name Foo::Bar::BarTest::Baz::BazTest#test_baz", { "start_line": 13, "start_column": 10, @@ -653,7 +653,7 @@ "arguments": [ "/fixtures/minitest_nested_classes_and_modules.rb", "Foo::Bar::BarTest::Baz::BazTest#test_baz", - "bundle exec ruby -Itest /fixtures/minitest_nested_classes_and_modules.rb --name Foo::Bar::BarTest::Baz::BazTest#test_baz", + "bundle exec ruby /fixtures/minitest_nested_classes_and_modules.rb --name Foo::Bar::BarTest::Baz::BazTest#test_baz", { "start_line": 13, "start_column": 10, @@ -686,7 +686,7 @@ "arguments": [ "/fixtures/minitest_nested_classes_and_modules.rb", "Foo::Bar::BarTest::Baz::BazTest#test_baz", - "bundle exec ruby -Itest /fixtures/minitest_nested_classes_and_modules.rb --name Foo::Bar::BarTest::Baz::BazTest#test_baz", + "bundle exec ruby /fixtures/minitest_nested_classes_and_modules.rb --name Foo::Bar::BarTest::Baz::BazTest#test_baz", { "start_line": 13, "start_column": 10, @@ -719,7 +719,7 @@ "arguments": [ "/fixtures/minitest_nested_classes_and_modules.rb", "Foo::Bar::BarTest::Baz::BazTest#test_baz_2", - "bundle exec ruby -Itest /fixtures/minitest_nested_classes_and_modules.rb --name Foo::Bar::BarTest::Baz::BazTest#test_baz_2", + "bundle exec ruby /fixtures/minitest_nested_classes_and_modules.rb --name Foo::Bar::BarTest::Baz::BazTest#test_baz_2", { "start_line": 15, "start_column": 10, @@ -752,7 +752,7 @@ "arguments": [ "/fixtures/minitest_nested_classes_and_modules.rb", "Foo::Bar::BarTest::Baz::BazTest#test_baz_2", - "bundle exec ruby -Itest /fixtures/minitest_nested_classes_and_modules.rb --name Foo::Bar::BarTest::Baz::BazTest#test_baz_2", + "bundle exec ruby /fixtures/minitest_nested_classes_and_modules.rb --name Foo::Bar::BarTest::Baz::BazTest#test_baz_2", { "start_line": 15, "start_column": 10, @@ -785,7 +785,7 @@ "arguments": [ "/fixtures/minitest_nested_classes_and_modules.rb", "Foo::Bar::BarTest::Baz::BazTest#test_baz_2", - "bundle exec ruby -Itest /fixtures/minitest_nested_classes_and_modules.rb --name Foo::Bar::BarTest::Baz::BazTest#test_baz_2", + "bundle exec ruby /fixtures/minitest_nested_classes_and_modules.rb --name Foo::Bar::BarTest::Baz::BazTest#test_baz_2", { "start_line": 15, "start_column": 10, @@ -818,7 +818,7 @@ "arguments": [ "/fixtures/minitest_nested_classes_and_modules.rb", "Foo::Baz::BazTest", - "bundle exec ruby -Itest /fixtures/minitest_nested_classes_and_modules.rb --name \"/^Foo::Baz::BazTest(#|::)/\"", + "bundle exec ruby /fixtures/minitest_nested_classes_and_modules.rb --name \"/^Foo::Baz::BazTest(#|::)/\"", { "start_line": 22, "start_column": 4, @@ -852,7 +852,7 @@ "arguments": [ "/fixtures/minitest_nested_classes_and_modules.rb", "Foo::Baz::BazTest", - "bundle exec ruby -Itest /fixtures/minitest_nested_classes_and_modules.rb --name \"/^Foo::Baz::BazTest(#|::)/\"", + "bundle exec ruby /fixtures/minitest_nested_classes_and_modules.rb --name \"/^Foo::Baz::BazTest(#|::)/\"", { "start_line": 22, "start_column": 4, @@ -886,7 +886,7 @@ "arguments": [ "/fixtures/minitest_nested_classes_and_modules.rb", "Foo::Baz::BazTest", - "bundle exec ruby -Itest /fixtures/minitest_nested_classes_and_modules.rb --name \"/^Foo::Baz::BazTest(#|::)/\"", + "bundle exec ruby /fixtures/minitest_nested_classes_and_modules.rb --name \"/^Foo::Baz::BazTest(#|::)/\"", { "start_line": 22, "start_column": 4, @@ -920,7 +920,7 @@ "arguments": [ "/fixtures/minitest_nested_classes_and_modules.rb", "Foo::Baz::BazTest#test_baz", - "bundle exec ruby -Itest /fixtures/minitest_nested_classes_and_modules.rb --name Foo::Baz::BazTest#test_baz", + "bundle exec ruby /fixtures/minitest_nested_classes_and_modules.rb --name Foo::Baz::BazTest#test_baz", { "start_line": 23, "start_column": 6, @@ -953,7 +953,7 @@ "arguments": [ "/fixtures/minitest_nested_classes_and_modules.rb", "Foo::Baz::BazTest#test_baz", - "bundle exec ruby -Itest /fixtures/minitest_nested_classes_and_modules.rb --name Foo::Baz::BazTest#test_baz", + "bundle exec ruby /fixtures/minitest_nested_classes_and_modules.rb --name Foo::Baz::BazTest#test_baz", { "start_line": 23, "start_column": 6, @@ -986,7 +986,7 @@ "arguments": [ "/fixtures/minitest_nested_classes_and_modules.rb", "Foo::Baz::BazTest#test_baz", - "bundle exec ruby -Itest /fixtures/minitest_nested_classes_and_modules.rb --name Foo::Baz::BazTest#test_baz", + "bundle exec ruby /fixtures/minitest_nested_classes_and_modules.rb --name Foo::Baz::BazTest#test_baz", { "start_line": 23, "start_column": 6, @@ -1019,7 +1019,7 @@ "arguments": [ "/fixtures/minitest_nested_classes_and_modules.rb", "Foo::Bar::FooBarTest", - "bundle exec ruby -Itest /fixtures/minitest_nested_classes_and_modules.rb --name \"/^Foo::Bar::FooBarTest(#|::)/\"", + "bundle exec ruby /fixtures/minitest_nested_classes_and_modules.rb --name \"/^Foo::Bar::FooBarTest(#|::)/\"", { "start_line": 29, "start_column": 2, @@ -1053,7 +1053,7 @@ "arguments": [ "/fixtures/minitest_nested_classes_and_modules.rb", "Foo::Bar::FooBarTest", - "bundle exec ruby -Itest /fixtures/minitest_nested_classes_and_modules.rb --name \"/^Foo::Bar::FooBarTest(#|::)/\"", + "bundle exec ruby /fixtures/minitest_nested_classes_and_modules.rb --name \"/^Foo::Bar::FooBarTest(#|::)/\"", { "start_line": 29, "start_column": 2, @@ -1087,7 +1087,7 @@ "arguments": [ "/fixtures/minitest_nested_classes_and_modules.rb", "Foo::Bar::FooBarTest", - "bundle exec ruby -Itest /fixtures/minitest_nested_classes_and_modules.rb --name \"/^Foo::Bar::FooBarTest(#|::)/\"", + "bundle exec ruby /fixtures/minitest_nested_classes_and_modules.rb --name \"/^Foo::Bar::FooBarTest(#|::)/\"", { "start_line": 29, "start_column": 2, @@ -1121,7 +1121,7 @@ "arguments": [ "/fixtures/minitest_nested_classes_and_modules.rb", "Foo::Bar::FooBarTest#test_foo_bar", - "bundle exec ruby -Itest /fixtures/minitest_nested_classes_and_modules.rb --name Foo::Bar::FooBarTest#test_foo_bar", + "bundle exec ruby /fixtures/minitest_nested_classes_and_modules.rb --name Foo::Bar::FooBarTest#test_foo_bar", { "start_line": 30, "start_column": 4, @@ -1154,7 +1154,7 @@ "arguments": [ "/fixtures/minitest_nested_classes_and_modules.rb", "Foo::Bar::FooBarTest#test_foo_bar", - "bundle exec ruby -Itest /fixtures/minitest_nested_classes_and_modules.rb --name Foo::Bar::FooBarTest#test_foo_bar", + "bundle exec ruby /fixtures/minitest_nested_classes_and_modules.rb --name Foo::Bar::FooBarTest#test_foo_bar", { "start_line": 30, "start_column": 4, @@ -1187,7 +1187,7 @@ "arguments": [ "/fixtures/minitest_nested_classes_and_modules.rb", "Foo::Bar::FooBarTest#test_foo_bar", - "bundle exec ruby -Itest /fixtures/minitest_nested_classes_and_modules.rb --name Foo::Bar::FooBarTest#test_foo_bar", + "bundle exec ruby /fixtures/minitest_nested_classes_and_modules.rb --name Foo::Bar::FooBarTest#test_foo_bar", { "start_line": 30, "start_column": 4, @@ -1220,7 +1220,7 @@ "arguments": [ "/fixtures/minitest_nested_classes_and_modules.rb", "Foo::Bar::FooBarTest#test_foo_bar_2", - "bundle exec ruby -Itest /fixtures/minitest_nested_classes_and_modules.rb --name Foo::Bar::FooBarTest#test_foo_bar_2", + "bundle exec ruby /fixtures/minitest_nested_classes_and_modules.rb --name Foo::Bar::FooBarTest#test_foo_bar_2", { "start_line": 32, "start_column": 4, @@ -1253,7 +1253,7 @@ "arguments": [ "/fixtures/minitest_nested_classes_and_modules.rb", "Foo::Bar::FooBarTest#test_foo_bar_2", - "bundle exec ruby -Itest /fixtures/minitest_nested_classes_and_modules.rb --name Foo::Bar::FooBarTest#test_foo_bar_2", + "bundle exec ruby /fixtures/minitest_nested_classes_and_modules.rb --name Foo::Bar::FooBarTest#test_foo_bar_2", { "start_line": 32, "start_column": 4, @@ -1286,7 +1286,7 @@ "arguments": [ "/fixtures/minitest_nested_classes_and_modules.rb", "Foo::Bar::FooBarTest#test_foo_bar_2", - "bundle exec ruby -Itest /fixtures/minitest_nested_classes_and_modules.rb --name Foo::Bar::FooBarTest#test_foo_bar_2", + "bundle exec ruby /fixtures/minitest_nested_classes_and_modules.rb --name Foo::Bar::FooBarTest#test_foo_bar_2", { "start_line": 32, "start_column": 4, @@ -1319,7 +1319,7 @@ "arguments": [ "/fixtures/minitest_nested_classes_and_modules.rb", "Foo::Bar::FooBar::Test", - "bundle exec ruby -Itest /fixtures/minitest_nested_classes_and_modules.rb --name \"/^Foo::Bar::FooBar::Test(#|::)/\"", + "bundle exec ruby /fixtures/minitest_nested_classes_and_modules.rb --name \"/^Foo::Bar::FooBar::Test(#|::)/\"", { "start_line": 38, "start_column": 2, @@ -1353,7 +1353,7 @@ "arguments": [ "/fixtures/minitest_nested_classes_and_modules.rb", "Foo::Bar::FooBar::Test", - "bundle exec ruby -Itest /fixtures/minitest_nested_classes_and_modules.rb --name \"/^Foo::Bar::FooBar::Test(#|::)/\"", + "bundle exec ruby /fixtures/minitest_nested_classes_and_modules.rb --name \"/^Foo::Bar::FooBar::Test(#|::)/\"", { "start_line": 38, "start_column": 2, @@ -1387,7 +1387,7 @@ "arguments": [ "/fixtures/minitest_nested_classes_and_modules.rb", "Foo::Bar::FooBar::Test", - "bundle exec ruby -Itest /fixtures/minitest_nested_classes_and_modules.rb --name \"/^Foo::Bar::FooBar::Test(#|::)/\"", + "bundle exec ruby /fixtures/minitest_nested_classes_and_modules.rb --name \"/^Foo::Bar::FooBar::Test(#|::)/\"", { "start_line": 38, "start_column": 2, @@ -1421,7 +1421,7 @@ "arguments": [ "/fixtures/minitest_nested_classes_and_modules.rb", "Foo::Bar::FooBar::Test#test_foo_bar_baz", - "bundle exec ruby -Itest /fixtures/minitest_nested_classes_and_modules.rb --name Foo::Bar::FooBar::Test#test_foo_bar_baz", + "bundle exec ruby /fixtures/minitest_nested_classes_and_modules.rb --name Foo::Bar::FooBar::Test#test_foo_bar_baz", { "start_line": 39, "start_column": 4, @@ -1454,7 +1454,7 @@ "arguments": [ "/fixtures/minitest_nested_classes_and_modules.rb", "Foo::Bar::FooBar::Test#test_foo_bar_baz", - "bundle exec ruby -Itest /fixtures/minitest_nested_classes_and_modules.rb --name Foo::Bar::FooBar::Test#test_foo_bar_baz", + "bundle exec ruby /fixtures/minitest_nested_classes_and_modules.rb --name Foo::Bar::FooBar::Test#test_foo_bar_baz", { "start_line": 39, "start_column": 4, @@ -1487,7 +1487,7 @@ "arguments": [ "/fixtures/minitest_nested_classes_and_modules.rb", "Foo::Bar::FooBar::Test#test_foo_bar_baz", - "bundle exec ruby -Itest /fixtures/minitest_nested_classes_and_modules.rb --name Foo::Bar::FooBar::Test#test_foo_bar_baz", + "bundle exec ruby /fixtures/minitest_nested_classes_and_modules.rb --name Foo::Bar::FooBar::Test#test_foo_bar_baz", { "start_line": 39, "start_column": 4, diff --git a/test/expectations/code_lens/minitest_spec_tests.exp.json b/test/expectations/code_lens/minitest_spec_tests.exp.json index 9481e5b48..a654b319e 100644 --- a/test/expectations/code_lens/minitest_spec_tests.exp.json +++ b/test/expectations/code_lens/minitest_spec_tests.exp.json @@ -17,7 +17,7 @@ "arguments": [ "/fixtures/minitest_spec_tests.rb", "Foo", - "bundle exec ruby -Itest /fixtures/minitest_spec_tests.rb --name \"/^Foo(#|::)/\"", + "bundle exec ruby /fixtures/minitest_spec_tests.rb --name \"/^Foo(#|::)/\"", { "start_line": 0, "start_column": 0, @@ -51,7 +51,7 @@ "arguments": [ "/fixtures/minitest_spec_tests.rb", "Foo", - "bundle exec ruby -Itest /fixtures/minitest_spec_tests.rb --name \"/^Foo(#|::)/\"", + "bundle exec ruby /fixtures/minitest_spec_tests.rb --name \"/^Foo(#|::)/\"", { "start_line": 0, "start_column": 0, @@ -85,7 +85,7 @@ "arguments": [ "/fixtures/minitest_spec_tests.rb", "Foo", - "bundle exec ruby -Itest /fixtures/minitest_spec_tests.rb --name \"/^Foo(#|::)/\"", + "bundle exec ruby /fixtures/minitest_spec_tests.rb --name \"/^Foo(#|::)/\"", { "start_line": 0, "start_column": 0, @@ -119,7 +119,7 @@ "arguments": [ "/fixtures/minitest_spec_tests.rb", "Foo#test_0001_it_level_one", - "bundle exec ruby -Itest /fixtures/minitest_spec_tests.rb --name \"/^Foo#test_0001_it_level_one$/\"", + "bundle exec ruby /fixtures/minitest_spec_tests.rb --name \"/^Foo#test_0001_it_level_one$/\"", { "start_line": 1, "start_column": 2, @@ -152,7 +152,7 @@ "arguments": [ "/fixtures/minitest_spec_tests.rb", "Foo#test_0001_it_level_one", - "bundle exec ruby -Itest /fixtures/minitest_spec_tests.rb --name \"/^Foo#test_0001_it_level_one$/\"", + "bundle exec ruby /fixtures/minitest_spec_tests.rb --name \"/^Foo#test_0001_it_level_one$/\"", { "start_line": 1, "start_column": 2, @@ -185,7 +185,7 @@ "arguments": [ "/fixtures/minitest_spec_tests.rb", "Foo#test_0001_it_level_one", - "bundle exec ruby -Itest /fixtures/minitest_spec_tests.rb --name \"/^Foo#test_0001_it_level_one$/\"", + "bundle exec ruby /fixtures/minitest_spec_tests.rb --name \"/^Foo#test_0001_it_level_one$/\"", { "start_line": 1, "start_column": 2, @@ -218,7 +218,7 @@ "arguments": [ "/fixtures/minitest_spec_tests.rb", "Foo::nested", - "bundle exec ruby -Itest /fixtures/minitest_spec_tests.rb --name \"/^Foo::nested(#|::)/\"", + "bundle exec ruby /fixtures/minitest_spec_tests.rb --name \"/^Foo::nested(#|::)/\"", { "start_line": 3, "start_column": 2, @@ -252,7 +252,7 @@ "arguments": [ "/fixtures/minitest_spec_tests.rb", "Foo::nested", - "bundle exec ruby -Itest /fixtures/minitest_spec_tests.rb --name \"/^Foo::nested(#|::)/\"", + "bundle exec ruby /fixtures/minitest_spec_tests.rb --name \"/^Foo::nested(#|::)/\"", { "start_line": 3, "start_column": 2, @@ -286,7 +286,7 @@ "arguments": [ "/fixtures/minitest_spec_tests.rb", "Foo::nested", - "bundle exec ruby -Itest /fixtures/minitest_spec_tests.rb --name \"/^Foo::nested(#|::)/\"", + "bundle exec ruby /fixtures/minitest_spec_tests.rb --name \"/^Foo::nested(#|::)/\"", { "start_line": 3, "start_column": 2, @@ -320,7 +320,7 @@ "arguments": [ "/fixtures/minitest_spec_tests.rb", "Foo::nested#test_0001_it_nested", - "bundle exec ruby -Itest /fixtures/minitest_spec_tests.rb --name \"/^Foo::nested#test_0001_it_nested$/\"", + "bundle exec ruby /fixtures/minitest_spec_tests.rb --name \"/^Foo::nested#test_0001_it_nested$/\"", { "start_line": 4, "start_column": 4, @@ -353,7 +353,7 @@ "arguments": [ "/fixtures/minitest_spec_tests.rb", "Foo::nested#test_0001_it_nested", - "bundle exec ruby -Itest /fixtures/minitest_spec_tests.rb --name \"/^Foo::nested#test_0001_it_nested$/\"", + "bundle exec ruby /fixtures/minitest_spec_tests.rb --name \"/^Foo::nested#test_0001_it_nested$/\"", { "start_line": 4, "start_column": 4, @@ -386,7 +386,7 @@ "arguments": [ "/fixtures/minitest_spec_tests.rb", "Foo::nested#test_0001_it_nested", - "bundle exec ruby -Itest /fixtures/minitest_spec_tests.rb --name \"/^Foo::nested#test_0001_it_nested$/\"", + "bundle exec ruby /fixtures/minitest_spec_tests.rb --name \"/^Foo::nested#test_0001_it_nested$/\"", { "start_line": 4, "start_column": 4, @@ -419,7 +419,7 @@ "arguments": [ "/fixtures/minitest_spec_tests.rb", "Foo::nested::deep_nested", - "bundle exec ruby -Itest /fixtures/minitest_spec_tests.rb --name \"/^Foo::nested::deep_nested(#|::)/\"", + "bundle exec ruby /fixtures/minitest_spec_tests.rb --name \"/^Foo::nested::deep_nested(#|::)/\"", { "start_line": 6, "start_column": 4, @@ -453,7 +453,7 @@ "arguments": [ "/fixtures/minitest_spec_tests.rb", "Foo::nested::deep_nested", - "bundle exec ruby -Itest /fixtures/minitest_spec_tests.rb --name \"/^Foo::nested::deep_nested(#|::)/\"", + "bundle exec ruby /fixtures/minitest_spec_tests.rb --name \"/^Foo::nested::deep_nested(#|::)/\"", { "start_line": 6, "start_column": 4, @@ -487,7 +487,7 @@ "arguments": [ "/fixtures/minitest_spec_tests.rb", "Foo::nested::deep_nested", - "bundle exec ruby -Itest /fixtures/minitest_spec_tests.rb --name \"/^Foo::nested::deep_nested(#|::)/\"", + "bundle exec ruby /fixtures/minitest_spec_tests.rb --name \"/^Foo::nested::deep_nested(#|::)/\"", { "start_line": 6, "start_column": 4, @@ -521,7 +521,7 @@ "arguments": [ "/fixtures/minitest_spec_tests.rb", "Foo::nested::deep_nested#test_0001_it_deep_nested", - "bundle exec ruby -Itest /fixtures/minitest_spec_tests.rb --name \"/^Foo::nested::deep_nested#test_0001_it_deep_nested$/\"", + "bundle exec ruby /fixtures/minitest_spec_tests.rb --name \"/^Foo::nested::deep_nested#test_0001_it_deep_nested$/\"", { "start_line": 7, "start_column": 6, @@ -554,7 +554,7 @@ "arguments": [ "/fixtures/minitest_spec_tests.rb", "Foo::nested::deep_nested#test_0001_it_deep_nested", - "bundle exec ruby -Itest /fixtures/minitest_spec_tests.rb --name \"/^Foo::nested::deep_nested#test_0001_it_deep_nested$/\"", + "bundle exec ruby /fixtures/minitest_spec_tests.rb --name \"/^Foo::nested::deep_nested#test_0001_it_deep_nested$/\"", { "start_line": 7, "start_column": 6, @@ -587,7 +587,7 @@ "arguments": [ "/fixtures/minitest_spec_tests.rb", "Foo::nested::deep_nested#test_0001_it_deep_nested", - "bundle exec ruby -Itest /fixtures/minitest_spec_tests.rb --name \"/^Foo::nested::deep_nested#test_0001_it_deep_nested$/\"", + "bundle exec ruby /fixtures/minitest_spec_tests.rb --name \"/^Foo::nested::deep_nested#test_0001_it_deep_nested$/\"", { "start_line": 7, "start_column": 6, @@ -620,7 +620,7 @@ "arguments": [ "/fixtures/minitest_spec_tests.rb", "Foo::nested#test_0002_it_nested_again", - "bundle exec ruby -Itest /fixtures/minitest_spec_tests.rb --name \"/^Foo::nested#test_0002_it_nested_again$/\"", + "bundle exec ruby /fixtures/minitest_spec_tests.rb --name \"/^Foo::nested#test_0002_it_nested_again$/\"", { "start_line": 10, "start_column": 4, @@ -653,7 +653,7 @@ "arguments": [ "/fixtures/minitest_spec_tests.rb", "Foo::nested#test_0002_it_nested_again", - "bundle exec ruby -Itest /fixtures/minitest_spec_tests.rb --name \"/^Foo::nested#test_0002_it_nested_again$/\"", + "bundle exec ruby /fixtures/minitest_spec_tests.rb --name \"/^Foo::nested#test_0002_it_nested_again$/\"", { "start_line": 10, "start_column": 4, @@ -686,7 +686,7 @@ "arguments": [ "/fixtures/minitest_spec_tests.rb", "Foo::nested#test_0002_it_nested_again", - "bundle exec ruby -Itest /fixtures/minitest_spec_tests.rb --name \"/^Foo::nested#test_0002_it_nested_again$/\"", + "bundle exec ruby /fixtures/minitest_spec_tests.rb --name \"/^Foo::nested#test_0002_it_nested_again$/\"", { "start_line": 10, "start_column": 4, @@ -719,7 +719,7 @@ "arguments": [ "/fixtures/minitest_spec_tests.rb", "Foo#test_0003_it_level_one_again", - "bundle exec ruby -Itest /fixtures/minitest_spec_tests.rb --name \"/^Foo#test_0003_it_level_one_again$/\"", + "bundle exec ruby /fixtures/minitest_spec_tests.rb --name \"/^Foo#test_0003_it_level_one_again$/\"", { "start_line": 13, "start_column": 2, @@ -752,7 +752,7 @@ "arguments": [ "/fixtures/minitest_spec_tests.rb", "Foo#test_0003_it_level_one_again", - "bundle exec ruby -Itest /fixtures/minitest_spec_tests.rb --name \"/^Foo#test_0003_it_level_one_again$/\"", + "bundle exec ruby /fixtures/minitest_spec_tests.rb --name \"/^Foo#test_0003_it_level_one_again$/\"", { "start_line": 13, "start_column": 2, @@ -785,7 +785,7 @@ "arguments": [ "/fixtures/minitest_spec_tests.rb", "Foo#test_0003_it_level_one_again", - "bundle exec ruby -Itest /fixtures/minitest_spec_tests.rb --name \"/^Foo#test_0003_it_level_one_again$/\"", + "bundle exec ruby /fixtures/minitest_spec_tests.rb --name \"/^Foo#test_0003_it_level_one_again$/\"", { "start_line": 13, "start_column": 2, @@ -818,7 +818,7 @@ "arguments": [ "/fixtures/minitest_spec_tests.rb", "Foo::Bar", - "bundle exec ruby -Itest /fixtures/minitest_spec_tests.rb --name \"/^Foo::Bar(#|::)/\"", + "bundle exec ruby /fixtures/minitest_spec_tests.rb --name \"/^Foo::Bar(#|::)/\"", { "start_line": 16, "start_column": 0, @@ -852,7 +852,7 @@ "arguments": [ "/fixtures/minitest_spec_tests.rb", "Foo::Bar", - "bundle exec ruby -Itest /fixtures/minitest_spec_tests.rb --name \"/^Foo::Bar(#|::)/\"", + "bundle exec ruby /fixtures/minitest_spec_tests.rb --name \"/^Foo::Bar(#|::)/\"", { "start_line": 16, "start_column": 0, @@ -886,7 +886,7 @@ "arguments": [ "/fixtures/minitest_spec_tests.rb", "Foo::Bar", - "bundle exec ruby -Itest /fixtures/minitest_spec_tests.rb --name \"/^Foo::Bar(#|::)/\"", + "bundle exec ruby /fixtures/minitest_spec_tests.rb --name \"/^Foo::Bar(#|::)/\"", { "start_line": 16, "start_column": 0, @@ -920,7 +920,7 @@ "arguments": [ "/fixtures/minitest_spec_tests.rb", "Foo::Bar#test_0001_it_class_constant_path", - "bundle exec ruby -Itest /fixtures/minitest_spec_tests.rb --name \"/^Foo::Bar#test_0001_it_class_constant_path$/\"", + "bundle exec ruby /fixtures/minitest_spec_tests.rb --name \"/^Foo::Bar#test_0001_it_class_constant_path$/\"", { "start_line": 17, "start_column": 2, @@ -953,7 +953,7 @@ "arguments": [ "/fixtures/minitest_spec_tests.rb", "Foo::Bar#test_0001_it_class_constant_path", - "bundle exec ruby -Itest /fixtures/minitest_spec_tests.rb --name \"/^Foo::Bar#test_0001_it_class_constant_path$/\"", + "bundle exec ruby /fixtures/minitest_spec_tests.rb --name \"/^Foo::Bar#test_0001_it_class_constant_path$/\"", { "start_line": 17, "start_column": 2, @@ -986,7 +986,7 @@ "arguments": [ "/fixtures/minitest_spec_tests.rb", "Foo::Bar#test_0001_it_class_constant_path", - "bundle exec ruby -Itest /fixtures/minitest_spec_tests.rb --name \"/^Foo::Bar#test_0001_it_class_constant_path$/\"", + "bundle exec ruby /fixtures/minitest_spec_tests.rb --name \"/^Foo::Bar#test_0001_it_class_constant_path$/\"", { "start_line": 17, "start_column": 2, @@ -1019,7 +1019,7 @@ "arguments": [ "/fixtures/minitest_spec_tests.rb", "Baz", - "bundle exec ruby -Itest /fixtures/minitest_spec_tests.rb --name \"/^Baz(#|::)/\"", + "bundle exec ruby /fixtures/minitest_spec_tests.rb --name \"/^Baz(#|::)/\"", { "start_line": 20, "start_column": 0, @@ -1053,7 +1053,7 @@ "arguments": [ "/fixtures/minitest_spec_tests.rb", "Baz", - "bundle exec ruby -Itest /fixtures/minitest_spec_tests.rb --name \"/^Baz(#|::)/\"", + "bundle exec ruby /fixtures/minitest_spec_tests.rb --name \"/^Baz(#|::)/\"", { "start_line": 20, "start_column": 0, @@ -1087,7 +1087,7 @@ "arguments": [ "/fixtures/minitest_spec_tests.rb", "Baz", - "bundle exec ruby -Itest /fixtures/minitest_spec_tests.rb --name \"/^Baz(#|::)/\"", + "bundle exec ruby /fixtures/minitest_spec_tests.rb --name \"/^Baz(#|::)/\"", { "start_line": 20, "start_column": 0, @@ -1121,7 +1121,7 @@ "arguments": [ "/fixtures/minitest_spec_tests.rb", "Baz::#foo", - "bundle exec ruby -Itest /fixtures/minitest_spec_tests.rb --name \"/^Baz::\\#foo(#|::)/\"", + "bundle exec ruby /fixtures/minitest_spec_tests.rb --name \"/^Baz::\\#foo(#|::)/\"", { "start_line": 21, "start_column": 2, @@ -1155,7 +1155,7 @@ "arguments": [ "/fixtures/minitest_spec_tests.rb", "Baz::#foo", - "bundle exec ruby -Itest /fixtures/minitest_spec_tests.rb --name \"/^Baz::\\#foo(#|::)/\"", + "bundle exec ruby /fixtures/minitest_spec_tests.rb --name \"/^Baz::\\#foo(#|::)/\"", { "start_line": 21, "start_column": 2, @@ -1189,7 +1189,7 @@ "arguments": [ "/fixtures/minitest_spec_tests.rb", "Baz::#foo", - "bundle exec ruby -Itest /fixtures/minitest_spec_tests.rb --name \"/^Baz::\\#foo(#|::)/\"", + "bundle exec ruby /fixtures/minitest_spec_tests.rb --name \"/^Baz::\\#foo(#|::)/\"", { "start_line": 21, "start_column": 2, @@ -1223,7 +1223,7 @@ "arguments": [ "/fixtures/minitest_spec_tests.rb", "Baz::#foo#test_0001_works", - "bundle exec ruby -Itest /fixtures/minitest_spec_tests.rb --name \"/^Baz::\\#foo#test_0001_works$/\"", + "bundle exec ruby /fixtures/minitest_spec_tests.rb --name \"/^Baz::\\#foo#test_0001_works$/\"", { "start_line": 22, "start_column": 4, @@ -1256,7 +1256,7 @@ "arguments": [ "/fixtures/minitest_spec_tests.rb", "Baz::#foo#test_0001_works", - "bundle exec ruby -Itest /fixtures/minitest_spec_tests.rb --name \"/^Baz::\\#foo#test_0001_works$/\"", + "bundle exec ruby /fixtures/minitest_spec_tests.rb --name \"/^Baz::\\#foo#test_0001_works$/\"", { "start_line": 22, "start_column": 4, @@ -1289,7 +1289,7 @@ "arguments": [ "/fixtures/minitest_spec_tests.rb", "Baz::#foo#test_0001_works", - "bundle exec ruby -Itest /fixtures/minitest_spec_tests.rb --name \"/^Baz::\\#foo#test_0001_works$/\"", + "bundle exec ruby /fixtures/minitest_spec_tests.rb --name \"/^Baz::\\#foo#test_0001_works$/\"", { "start_line": 22, "start_column": 4, @@ -1322,7 +1322,7 @@ "arguments": [ "/fixtures/minitest_spec_tests.rb", "Baz::#bar", - "bundle exec ruby -Itest /fixtures/minitest_spec_tests.rb --name \"/^Baz::\\#bar(#|::)/\"", + "bundle exec ruby /fixtures/minitest_spec_tests.rb --name \"/^Baz::\\#bar(#|::)/\"", { "start_line": 25, "start_column": 2, @@ -1356,7 +1356,7 @@ "arguments": [ "/fixtures/minitest_spec_tests.rb", "Baz::#bar", - "bundle exec ruby -Itest /fixtures/minitest_spec_tests.rb --name \"/^Baz::\\#bar(#|::)/\"", + "bundle exec ruby /fixtures/minitest_spec_tests.rb --name \"/^Baz::\\#bar(#|::)/\"", { "start_line": 25, "start_column": 2, @@ -1390,7 +1390,7 @@ "arguments": [ "/fixtures/minitest_spec_tests.rb", "Baz::#bar", - "bundle exec ruby -Itest /fixtures/minitest_spec_tests.rb --name \"/^Baz::\\#bar(#|::)/\"", + "bundle exec ruby /fixtures/minitest_spec_tests.rb --name \"/^Baz::\\#bar(#|::)/\"", { "start_line": 25, "start_column": 2, @@ -1424,7 +1424,7 @@ "arguments": [ "/fixtures/minitest_spec_tests.rb", "Baz::#bar#test_0001_works", - "bundle exec ruby -Itest /fixtures/minitest_spec_tests.rb --name \"/^Baz::\\#bar#test_0001_works$/\"", + "bundle exec ruby /fixtures/minitest_spec_tests.rb --name \"/^Baz::\\#bar#test_0001_works$/\"", { "start_line": 26, "start_column": 4, @@ -1457,7 +1457,7 @@ "arguments": [ "/fixtures/minitest_spec_tests.rb", "Baz::#bar#test_0001_works", - "bundle exec ruby -Itest /fixtures/minitest_spec_tests.rb --name \"/^Baz::\\#bar#test_0001_works$/\"", + "bundle exec ruby /fixtures/minitest_spec_tests.rb --name \"/^Baz::\\#bar#test_0001_works$/\"", { "start_line": 26, "start_column": 4, @@ -1490,7 +1490,7 @@ "arguments": [ "/fixtures/minitest_spec_tests.rb", "Baz::#bar#test_0001_works", - "bundle exec ruby -Itest /fixtures/minitest_spec_tests.rb --name \"/^Baz::\\#bar#test_0001_works$/\"", + "bundle exec ruby /fixtures/minitest_spec_tests.rb --name \"/^Baz::\\#bar#test_0001_works$/\"", { "start_line": 26, "start_column": 4, diff --git a/test/expectations/code_lens/minitest_tests.exp.json b/test/expectations/code_lens/minitest_tests.exp.json index 0108de250..f4a9e567e 100644 --- a/test/expectations/code_lens/minitest_tests.exp.json +++ b/test/expectations/code_lens/minitest_tests.exp.json @@ -17,7 +17,7 @@ "arguments": [ "/fixtures/minitest_tests.rb", "Test", - "bundle exec ruby -Itest /fixtures/minitest_tests.rb --name \"/^Test(#|::)/\"", + "bundle exec ruby /fixtures/minitest_tests.rb --name \"/^Test(#|::)/\"", { "start_line": 0, "start_column": 0, @@ -51,7 +51,7 @@ "arguments": [ "/fixtures/minitest_tests.rb", "Test", - "bundle exec ruby -Itest /fixtures/minitest_tests.rb --name \"/^Test(#|::)/\"", + "bundle exec ruby /fixtures/minitest_tests.rb --name \"/^Test(#|::)/\"", { "start_line": 0, "start_column": 0, @@ -85,7 +85,7 @@ "arguments": [ "/fixtures/minitest_tests.rb", "Test", - "bundle exec ruby -Itest /fixtures/minitest_tests.rb --name \"/^Test(#|::)/\"", + "bundle exec ruby /fixtures/minitest_tests.rb --name \"/^Test(#|::)/\"", { "start_line": 0, "start_column": 0, @@ -119,7 +119,7 @@ "arguments": [ "/fixtures/minitest_tests.rb", "Test#test_public", - "bundle exec ruby -Itest /fixtures/minitest_tests.rb --name Test#test_public", + "bundle exec ruby /fixtures/minitest_tests.rb --name Test#test_public", { "start_line": 5, "start_column": 2, @@ -152,7 +152,7 @@ "arguments": [ "/fixtures/minitest_tests.rb", "Test#test_public", - "bundle exec ruby -Itest /fixtures/minitest_tests.rb --name Test#test_public", + "bundle exec ruby /fixtures/minitest_tests.rb --name Test#test_public", { "start_line": 5, "start_column": 2, @@ -185,7 +185,7 @@ "arguments": [ "/fixtures/minitest_tests.rb", "Test#test_public", - "bundle exec ruby -Itest /fixtures/minitest_tests.rb --name Test#test_public", + "bundle exec ruby /fixtures/minitest_tests.rb --name Test#test_public", { "start_line": 5, "start_column": 2, @@ -218,7 +218,7 @@ "arguments": [ "/fixtures/minitest_tests.rb", "Test#test_public_command", - "bundle exec ruby -Itest /fixtures/minitest_tests.rb --name Test#test_public_command", + "bundle exec ruby /fixtures/minitest_tests.rb --name Test#test_public_command", { "start_line": 9, "start_column": 9, @@ -251,7 +251,7 @@ "arguments": [ "/fixtures/minitest_tests.rb", "Test#test_public_command", - "bundle exec ruby -Itest /fixtures/minitest_tests.rb --name Test#test_public_command", + "bundle exec ruby /fixtures/minitest_tests.rb --name Test#test_public_command", { "start_line": 9, "start_column": 9, @@ -284,7 +284,7 @@ "arguments": [ "/fixtures/minitest_tests.rb", "Test#test_public_command", - "bundle exec ruby -Itest /fixtures/minitest_tests.rb --name Test#test_public_command", + "bundle exec ruby /fixtures/minitest_tests.rb --name Test#test_public_command", { "start_line": 9, "start_column": 9, @@ -317,7 +317,7 @@ "arguments": [ "/fixtures/minitest_tests.rb", "Test#test_another_public", - "bundle exec ruby -Itest /fixtures/minitest_tests.rb --name Test#test_another_public", + "bundle exec ruby /fixtures/minitest_tests.rb --name Test#test_another_public", { "start_line": 11, "start_column": 9, @@ -350,7 +350,7 @@ "arguments": [ "/fixtures/minitest_tests.rb", "Test#test_another_public", - "bundle exec ruby -Itest /fixtures/minitest_tests.rb --name Test#test_another_public", + "bundle exec ruby /fixtures/minitest_tests.rb --name Test#test_another_public", { "start_line": 11, "start_column": 9, @@ -383,7 +383,7 @@ "arguments": [ "/fixtures/minitest_tests.rb", "Test#test_another_public", - "bundle exec ruby -Itest /fixtures/minitest_tests.rb --name Test#test_another_public", + "bundle exec ruby /fixtures/minitest_tests.rb --name Test#test_another_public", { "start_line": 11, "start_column": 9, @@ -416,7 +416,7 @@ "arguments": [ "/fixtures/minitest_tests.rb", "Test#test_public_vcall", - "bundle exec ruby -Itest /fixtures/minitest_tests.rb --name Test#test_public_vcall", + "bundle exec ruby /fixtures/minitest_tests.rb --name Test#test_public_vcall", { "start_line": 17, "start_column": 2, @@ -449,7 +449,7 @@ "arguments": [ "/fixtures/minitest_tests.rb", "Test#test_public_vcall", - "bundle exec ruby -Itest /fixtures/minitest_tests.rb --name Test#test_public_vcall", + "bundle exec ruby /fixtures/minitest_tests.rb --name Test#test_public_vcall", { "start_line": 17, "start_column": 2, @@ -482,7 +482,7 @@ "arguments": [ "/fixtures/minitest_tests.rb", "Test#test_public_vcall", - "bundle exec ruby -Itest /fixtures/minitest_tests.rb --name Test#test_public_vcall", + "bundle exec ruby /fixtures/minitest_tests.rb --name Test#test_public_vcall", { "start_line": 17, "start_column": 2, @@ -515,7 +515,7 @@ "arguments": [ "/fixtures/minitest_tests.rb", "Test#test_with_q?", - "bundle exec ruby -Itest /fixtures/minitest_tests.rb --name Test#test_with_q\\?", + "bundle exec ruby /fixtures/minitest_tests.rb --name Test#test_with_q\\?", { "start_line": 19, "start_column": 2, @@ -548,7 +548,7 @@ "arguments": [ "/fixtures/minitest_tests.rb", "Test#test_with_q?", - "bundle exec ruby -Itest /fixtures/minitest_tests.rb --name Test#test_with_q\\?", + "bundle exec ruby /fixtures/minitest_tests.rb --name Test#test_with_q\\?", { "start_line": 19, "start_column": 2, @@ -581,7 +581,7 @@ "arguments": [ "/fixtures/minitest_tests.rb", "Test#test_with_q?", - "bundle exec ruby -Itest /fixtures/minitest_tests.rb --name Test#test_with_q\\?", + "bundle exec ruby /fixtures/minitest_tests.rb --name Test#test_with_q\\?", { "start_line": 19, "start_column": 2, @@ -614,7 +614,7 @@ "arguments": [ "/fixtures/minitest_tests.rb", "AnotherTest", - "bundle exec ruby -Itest /fixtures/minitest_tests.rb --name \"/^AnotherTest(#|::)/\"", + "bundle exec ruby /fixtures/minitest_tests.rb --name \"/^AnotherTest(#|::)/\"", { "start_line": 24, "start_column": 0, @@ -648,7 +648,7 @@ "arguments": [ "/fixtures/minitest_tests.rb", "AnotherTest", - "bundle exec ruby -Itest /fixtures/minitest_tests.rb --name \"/^AnotherTest(#|::)/\"", + "bundle exec ruby /fixtures/minitest_tests.rb --name \"/^AnotherTest(#|::)/\"", { "start_line": 24, "start_column": 0, @@ -682,7 +682,7 @@ "arguments": [ "/fixtures/minitest_tests.rb", "AnotherTest", - "bundle exec ruby -Itest /fixtures/minitest_tests.rb --name \"/^AnotherTest(#|::)/\"", + "bundle exec ruby /fixtures/minitest_tests.rb --name \"/^AnotherTest(#|::)/\"", { "start_line": 24, "start_column": 0, @@ -716,7 +716,7 @@ "arguments": [ "/fixtures/minitest_tests.rb", "AnotherTest#test_public", - "bundle exec ruby -Itest /fixtures/minitest_tests.rb --name AnotherTest#test_public", + "bundle exec ruby /fixtures/minitest_tests.rb --name AnotherTest#test_public", { "start_line": 25, "start_column": 2, @@ -749,7 +749,7 @@ "arguments": [ "/fixtures/minitest_tests.rb", "AnotherTest#test_public", - "bundle exec ruby -Itest /fixtures/minitest_tests.rb --name AnotherTest#test_public", + "bundle exec ruby /fixtures/minitest_tests.rb --name AnotherTest#test_public", { "start_line": 25, "start_column": 2, @@ -782,7 +782,7 @@ "arguments": [ "/fixtures/minitest_tests.rb", "AnotherTest#test_public", - "bundle exec ruby -Itest /fixtures/minitest_tests.rb --name AnotherTest#test_public", + "bundle exec ruby /fixtures/minitest_tests.rb --name AnotherTest#test_public", { "start_line": 25, "start_column": 2, @@ -815,7 +815,7 @@ "arguments": [ "/fixtures/minitest_tests.rb", "AnotherTest#test_public_2", - "bundle exec ruby -Itest /fixtures/minitest_tests.rb --name AnotherTest#test_public_2", + "bundle exec ruby /fixtures/minitest_tests.rb --name AnotherTest#test_public_2", { "start_line": 31, "start_column": 2, @@ -848,7 +848,7 @@ "arguments": [ "/fixtures/minitest_tests.rb", "AnotherTest#test_public_2", - "bundle exec ruby -Itest /fixtures/minitest_tests.rb --name AnotherTest#test_public_2", + "bundle exec ruby /fixtures/minitest_tests.rb --name AnotherTest#test_public_2", { "start_line": 31, "start_column": 2, @@ -881,7 +881,7 @@ "arguments": [ "/fixtures/minitest_tests.rb", "AnotherTest#test_public_2", - "bundle exec ruby -Itest /fixtures/minitest_tests.rb --name AnotherTest#test_public_2", + "bundle exec ruby /fixtures/minitest_tests.rb --name AnotherTest#test_public_2", { "start_line": 31, "start_column": 2, diff --git a/test/expectations/code_lens/minitest_with_dynamic_constant_path.exp.json b/test/expectations/code_lens/minitest_with_dynamic_constant_path.exp.json index 9e5ab04fb..c16ef014d 100644 --- a/test/expectations/code_lens/minitest_with_dynamic_constant_path.exp.json +++ b/test/expectations/code_lens/minitest_with_dynamic_constant_path.exp.json @@ -17,7 +17,7 @@ "arguments": [ "/fixtures/minitest_with_dynamic_constant_path.rb", "::Test", - "bundle exec ruby -Itest /fixtures/minitest_with_dynamic_constant_path.rb --name \"/::Test(#|::)/\"", + "bundle exec ruby /fixtures/minitest_with_dynamic_constant_path.rb --name \"/::Test(#|::)/\"", { "start_line": 9, "start_column": 2, @@ -51,7 +51,7 @@ "arguments": [ "/fixtures/minitest_with_dynamic_constant_path.rb", "::Test", - "bundle exec ruby -Itest /fixtures/minitest_with_dynamic_constant_path.rb --name \"/::Test(#|::)/\"", + "bundle exec ruby /fixtures/minitest_with_dynamic_constant_path.rb --name \"/::Test(#|::)/\"", { "start_line": 9, "start_column": 2, @@ -85,7 +85,7 @@ "arguments": [ "/fixtures/minitest_with_dynamic_constant_path.rb", "::Test", - "bundle exec ruby -Itest /fixtures/minitest_with_dynamic_constant_path.rb --name \"/::Test(#|::)/\"", + "bundle exec ruby /fixtures/minitest_with_dynamic_constant_path.rb --name \"/::Test(#|::)/\"", { "start_line": 9, "start_column": 2, @@ -119,7 +119,7 @@ "arguments": [ "/fixtures/minitest_with_dynamic_constant_path.rb", "::Test#test_something", - "bundle exec ruby -Itest /fixtures/minitest_with_dynamic_constant_path.rb --name /::Test#test_something$/", + "bundle exec ruby /fixtures/minitest_with_dynamic_constant_path.rb --name /::Test#test_something$/", { "start_line": 10, "start_column": 4, @@ -152,7 +152,7 @@ "arguments": [ "/fixtures/minitest_with_dynamic_constant_path.rb", "::Test#test_something", - "bundle exec ruby -Itest /fixtures/minitest_with_dynamic_constant_path.rb --name /::Test#test_something$/", + "bundle exec ruby /fixtures/minitest_with_dynamic_constant_path.rb --name /::Test#test_something$/", { "start_line": 10, "start_column": 4, @@ -185,7 +185,7 @@ "arguments": [ "/fixtures/minitest_with_dynamic_constant_path.rb", "::Test#test_something", - "bundle exec ruby -Itest /fixtures/minitest_with_dynamic_constant_path.rb --name /::Test#test_something$/", + "bundle exec ruby /fixtures/minitest_with_dynamic_constant_path.rb --name /::Test#test_something$/", { "start_line": 10, "start_column": 4, @@ -218,7 +218,7 @@ "arguments": [ "/fixtures/minitest_with_dynamic_constant_path.rb", "::Test#test_something_else", - "bundle exec ruby -Itest /fixtures/minitest_with_dynamic_constant_path.rb --name /::Test#test_something_else$/", + "bundle exec ruby /fixtures/minitest_with_dynamic_constant_path.rb --name /::Test#test_something_else$/", { "start_line": 12, "start_column": 4, @@ -251,7 +251,7 @@ "arguments": [ "/fixtures/minitest_with_dynamic_constant_path.rb", "::Test#test_something_else", - "bundle exec ruby -Itest /fixtures/minitest_with_dynamic_constant_path.rb --name /::Test#test_something_else$/", + "bundle exec ruby /fixtures/minitest_with_dynamic_constant_path.rb --name /::Test#test_something_else$/", { "start_line": 12, "start_column": 4, @@ -284,7 +284,7 @@ "arguments": [ "/fixtures/minitest_with_dynamic_constant_path.rb", "::Test#test_something_else", - "bundle exec ruby -Itest /fixtures/minitest_with_dynamic_constant_path.rb --name /::Test#test_something_else$/", + "bundle exec ruby /fixtures/minitest_with_dynamic_constant_path.rb --name /::Test#test_something_else$/", { "start_line": 12, "start_column": 4, @@ -317,7 +317,7 @@ "arguments": [ "/fixtures/minitest_with_dynamic_constant_path.rb", "::Test::NestedTest", - "bundle exec ruby -Itest /fixtures/minitest_with_dynamic_constant_path.rb --name \"/::Test::NestedTest(#|::)/\"", + "bundle exec ruby /fixtures/minitest_with_dynamic_constant_path.rb --name \"/::Test::NestedTest(#|::)/\"", { "start_line": 14, "start_column": 4, @@ -351,7 +351,7 @@ "arguments": [ "/fixtures/minitest_with_dynamic_constant_path.rb", "::Test::NestedTest", - "bundle exec ruby -Itest /fixtures/minitest_with_dynamic_constant_path.rb --name \"/::Test::NestedTest(#|::)/\"", + "bundle exec ruby /fixtures/minitest_with_dynamic_constant_path.rb --name \"/::Test::NestedTest(#|::)/\"", { "start_line": 14, "start_column": 4, @@ -385,7 +385,7 @@ "arguments": [ "/fixtures/minitest_with_dynamic_constant_path.rb", "::Test::NestedTest", - "bundle exec ruby -Itest /fixtures/minitest_with_dynamic_constant_path.rb --name \"/::Test::NestedTest(#|::)/\"", + "bundle exec ruby /fixtures/minitest_with_dynamic_constant_path.rb --name \"/::Test::NestedTest(#|::)/\"", { "start_line": 14, "start_column": 4, @@ -419,7 +419,7 @@ "arguments": [ "/fixtures/minitest_with_dynamic_constant_path.rb", "::Test::NestedTest#test_nested", - "bundle exec ruby -Itest /fixtures/minitest_with_dynamic_constant_path.rb --name /::Test::NestedTest#test_nested$/", + "bundle exec ruby /fixtures/minitest_with_dynamic_constant_path.rb --name /::Test::NestedTest#test_nested$/", { "start_line": 15, "start_column": 6, @@ -452,7 +452,7 @@ "arguments": [ "/fixtures/minitest_with_dynamic_constant_path.rb", "::Test::NestedTest#test_nested", - "bundle exec ruby -Itest /fixtures/minitest_with_dynamic_constant_path.rb --name /::Test::NestedTest#test_nested$/", + "bundle exec ruby /fixtures/minitest_with_dynamic_constant_path.rb --name /::Test::NestedTest#test_nested$/", { "start_line": 15, "start_column": 6, @@ -485,7 +485,7 @@ "arguments": [ "/fixtures/minitest_with_dynamic_constant_path.rb", "::Test::NestedTest#test_nested", - "bundle exec ruby -Itest /fixtures/minitest_with_dynamic_constant_path.rb --name /::Test::NestedTest#test_nested$/", + "bundle exec ruby /fixtures/minitest_with_dynamic_constant_path.rb --name /::Test::NestedTest#test_nested$/", { "start_line": 15, "start_column": 6, @@ -518,7 +518,7 @@ "arguments": [ "/fixtures/minitest_with_dynamic_constant_path.rb", "::SomeOtherTest", - "bundle exec ruby -Itest /fixtures/minitest_with_dynamic_constant_path.rb --name \"/::SomeOtherTest(#|::)/\"", + "bundle exec ruby /fixtures/minitest_with_dynamic_constant_path.rb --name \"/::SomeOtherTest(#|::)/\"", { "start_line": 19, "start_column": 2, @@ -552,7 +552,7 @@ "arguments": [ "/fixtures/minitest_with_dynamic_constant_path.rb", "::SomeOtherTest", - "bundle exec ruby -Itest /fixtures/minitest_with_dynamic_constant_path.rb --name \"/::SomeOtherTest(#|::)/\"", + "bundle exec ruby /fixtures/minitest_with_dynamic_constant_path.rb --name \"/::SomeOtherTest(#|::)/\"", { "start_line": 19, "start_column": 2, @@ -586,7 +586,7 @@ "arguments": [ "/fixtures/minitest_with_dynamic_constant_path.rb", "::SomeOtherTest", - "bundle exec ruby -Itest /fixtures/minitest_with_dynamic_constant_path.rb --name \"/::SomeOtherTest(#|::)/\"", + "bundle exec ruby /fixtures/minitest_with_dynamic_constant_path.rb --name \"/::SomeOtherTest(#|::)/\"", { "start_line": 19, "start_column": 2, @@ -620,7 +620,7 @@ "arguments": [ "/fixtures/minitest_with_dynamic_constant_path.rb", "::SomeOtherTest#test_stuff", - "bundle exec ruby -Itest /fixtures/minitest_with_dynamic_constant_path.rb --name /::SomeOtherTest#test_stuff$/", + "bundle exec ruby /fixtures/minitest_with_dynamic_constant_path.rb --name /::SomeOtherTest#test_stuff$/", { "start_line": 20, "start_column": 4, @@ -653,7 +653,7 @@ "arguments": [ "/fixtures/minitest_with_dynamic_constant_path.rb", "::SomeOtherTest#test_stuff", - "bundle exec ruby -Itest /fixtures/minitest_with_dynamic_constant_path.rb --name /::SomeOtherTest#test_stuff$/", + "bundle exec ruby /fixtures/minitest_with_dynamic_constant_path.rb --name /::SomeOtherTest#test_stuff$/", { "start_line": 20, "start_column": 4, @@ -686,7 +686,7 @@ "arguments": [ "/fixtures/minitest_with_dynamic_constant_path.rb", "::SomeOtherTest#test_stuff", - "bundle exec ruby -Itest /fixtures/minitest_with_dynamic_constant_path.rb --name /::SomeOtherTest#test_stuff$/", + "bundle exec ruby /fixtures/minitest_with_dynamic_constant_path.rb --name /::SomeOtherTest#test_stuff$/", { "start_line": 20, "start_column": 4, @@ -719,7 +719,7 @@ "arguments": [ "/fixtures/minitest_with_dynamic_constant_path.rb", "::SomeOtherTest#test_other_stuff", - "bundle exec ruby -Itest /fixtures/minitest_with_dynamic_constant_path.rb --name /::SomeOtherTest#test_other_stuff$/", + "bundle exec ruby /fixtures/minitest_with_dynamic_constant_path.rb --name /::SomeOtherTest#test_other_stuff$/", { "start_line": 22, "start_column": 4, @@ -752,7 +752,7 @@ "arguments": [ "/fixtures/minitest_with_dynamic_constant_path.rb", "::SomeOtherTest#test_other_stuff", - "bundle exec ruby -Itest /fixtures/minitest_with_dynamic_constant_path.rb --name /::SomeOtherTest#test_other_stuff$/", + "bundle exec ruby /fixtures/minitest_with_dynamic_constant_path.rb --name /::SomeOtherTest#test_other_stuff$/", { "start_line": 22, "start_column": 4, @@ -785,7 +785,7 @@ "arguments": [ "/fixtures/minitest_with_dynamic_constant_path.rb", "::SomeOtherTest#test_other_stuff", - "bundle exec ruby -Itest /fixtures/minitest_with_dynamic_constant_path.rb --name /::SomeOtherTest#test_other_stuff$/", + "bundle exec ruby /fixtures/minitest_with_dynamic_constant_path.rb --name /::SomeOtherTest#test_other_stuff$/", { "start_line": 22, "start_column": 4, diff --git a/test/expectations/code_lens/nested_minitest_tests.exp.json b/test/expectations/code_lens/nested_minitest_tests.exp.json index e22624c03..6eed67ac0 100644 --- a/test/expectations/code_lens/nested_minitest_tests.exp.json +++ b/test/expectations/code_lens/nested_minitest_tests.exp.json @@ -17,7 +17,7 @@ "arguments": [ "/fixtures/nested_minitest_tests.rb", "ParentTest", - "bundle exec ruby -Itest /fixtures/nested_minitest_tests.rb --name \"/^ParentTest(#|::)/\"", + "bundle exec ruby /fixtures/nested_minitest_tests.rb --name \"/^ParentTest(#|::)/\"", { "start_line": 0, "start_column": 0, @@ -51,7 +51,7 @@ "arguments": [ "/fixtures/nested_minitest_tests.rb", "ParentTest", - "bundle exec ruby -Itest /fixtures/nested_minitest_tests.rb --name \"/^ParentTest(#|::)/\"", + "bundle exec ruby /fixtures/nested_minitest_tests.rb --name \"/^ParentTest(#|::)/\"", { "start_line": 0, "start_column": 0, @@ -85,7 +85,7 @@ "arguments": [ "/fixtures/nested_minitest_tests.rb", "ParentTest", - "bundle exec ruby -Itest /fixtures/nested_minitest_tests.rb --name \"/^ParentTest(#|::)/\"", + "bundle exec ruby /fixtures/nested_minitest_tests.rb --name \"/^ParentTest(#|::)/\"", { "start_line": 0, "start_column": 0, @@ -119,7 +119,7 @@ "arguments": [ "/fixtures/nested_minitest_tests.rb", "ParentTest#test_public", - "bundle exec ruby -Itest /fixtures/nested_minitest_tests.rb --name ParentTest#test_public", + "bundle exec ruby /fixtures/nested_minitest_tests.rb --name ParentTest#test_public", { "start_line": 1, "start_column": 2, @@ -152,7 +152,7 @@ "arguments": [ "/fixtures/nested_minitest_tests.rb", "ParentTest#test_public", - "bundle exec ruby -Itest /fixtures/nested_minitest_tests.rb --name ParentTest#test_public", + "bundle exec ruby /fixtures/nested_minitest_tests.rb --name ParentTest#test_public", { "start_line": 1, "start_column": 2, @@ -185,7 +185,7 @@ "arguments": [ "/fixtures/nested_minitest_tests.rb", "ParentTest#test_public", - "bundle exec ruby -Itest /fixtures/nested_minitest_tests.rb --name ParentTest#test_public", + "bundle exec ruby /fixtures/nested_minitest_tests.rb --name ParentTest#test_public", { "start_line": 1, "start_column": 2, @@ -218,7 +218,7 @@ "arguments": [ "/fixtures/nested_minitest_tests.rb", "ParentTest::FirstChildTest", - "bundle exec ruby -Itest /fixtures/nested_minitest_tests.rb --name \"/^ParentTest::FirstChildTest(#|::)/\"", + "bundle exec ruby /fixtures/nested_minitest_tests.rb --name \"/^ParentTest::FirstChildTest(#|::)/\"", { "start_line": 5, "start_column": 2, @@ -252,7 +252,7 @@ "arguments": [ "/fixtures/nested_minitest_tests.rb", "ParentTest::FirstChildTest", - "bundle exec ruby -Itest /fixtures/nested_minitest_tests.rb --name \"/^ParentTest::FirstChildTest(#|::)/\"", + "bundle exec ruby /fixtures/nested_minitest_tests.rb --name \"/^ParentTest::FirstChildTest(#|::)/\"", { "start_line": 5, "start_column": 2, @@ -286,7 +286,7 @@ "arguments": [ "/fixtures/nested_minitest_tests.rb", "ParentTest::FirstChildTest", - "bundle exec ruby -Itest /fixtures/nested_minitest_tests.rb --name \"/^ParentTest::FirstChildTest(#|::)/\"", + "bundle exec ruby /fixtures/nested_minitest_tests.rb --name \"/^ParentTest::FirstChildTest(#|::)/\"", { "start_line": 5, "start_column": 2, @@ -320,7 +320,7 @@ "arguments": [ "/fixtures/nested_minitest_tests.rb", "ParentTest::FirstChildTest#test_public", - "bundle exec ruby -Itest /fixtures/nested_minitest_tests.rb --name ParentTest::FirstChildTest#test_public", + "bundle exec ruby /fixtures/nested_minitest_tests.rb --name ParentTest::FirstChildTest#test_public", { "start_line": 6, "start_column": 4, @@ -353,7 +353,7 @@ "arguments": [ "/fixtures/nested_minitest_tests.rb", "ParentTest::FirstChildTest#test_public", - "bundle exec ruby -Itest /fixtures/nested_minitest_tests.rb --name ParentTest::FirstChildTest#test_public", + "bundle exec ruby /fixtures/nested_minitest_tests.rb --name ParentTest::FirstChildTest#test_public", { "start_line": 6, "start_column": 4, @@ -386,7 +386,7 @@ "arguments": [ "/fixtures/nested_minitest_tests.rb", "ParentTest::FirstChildTest#test_public", - "bundle exec ruby -Itest /fixtures/nested_minitest_tests.rb --name ParentTest::FirstChildTest#test_public", + "bundle exec ruby /fixtures/nested_minitest_tests.rb --name ParentTest::FirstChildTest#test_public", { "start_line": 6, "start_column": 4, @@ -419,7 +419,7 @@ "arguments": [ "/fixtures/nested_minitest_tests.rb", "ParentTest::SecondChildTest", - "bundle exec ruby -Itest /fixtures/nested_minitest_tests.rb --name \"/^ParentTest::SecondChildTest(#|::)/\"", + "bundle exec ruby /fixtures/nested_minitest_tests.rb --name \"/^ParentTest::SecondChildTest(#|::)/\"", { "start_line": 13, "start_column": 2, @@ -453,7 +453,7 @@ "arguments": [ "/fixtures/nested_minitest_tests.rb", "ParentTest::SecondChildTest", - "bundle exec ruby -Itest /fixtures/nested_minitest_tests.rb --name \"/^ParentTest::SecondChildTest(#|::)/\"", + "bundle exec ruby /fixtures/nested_minitest_tests.rb --name \"/^ParentTest::SecondChildTest(#|::)/\"", { "start_line": 13, "start_column": 2, @@ -487,7 +487,7 @@ "arguments": [ "/fixtures/nested_minitest_tests.rb", "ParentTest::SecondChildTest", - "bundle exec ruby -Itest /fixtures/nested_minitest_tests.rb --name \"/^ParentTest::SecondChildTest(#|::)/\"", + "bundle exec ruby /fixtures/nested_minitest_tests.rb --name \"/^ParentTest::SecondChildTest(#|::)/\"", { "start_line": 13, "start_column": 2, @@ -521,7 +521,7 @@ "arguments": [ "/fixtures/nested_minitest_tests.rb", "ParentTest::SecondChildTest#test_public", - "bundle exec ruby -Itest /fixtures/nested_minitest_tests.rb --name ParentTest::SecondChildTest#test_public", + "bundle exec ruby /fixtures/nested_minitest_tests.rb --name ParentTest::SecondChildTest#test_public", { "start_line": 14, "start_column": 4, @@ -554,7 +554,7 @@ "arguments": [ "/fixtures/nested_minitest_tests.rb", "ParentTest::SecondChildTest#test_public", - "bundle exec ruby -Itest /fixtures/nested_minitest_tests.rb --name ParentTest::SecondChildTest#test_public", + "bundle exec ruby /fixtures/nested_minitest_tests.rb --name ParentTest::SecondChildTest#test_public", { "start_line": 14, "start_column": 4, @@ -587,7 +587,7 @@ "arguments": [ "/fixtures/nested_minitest_tests.rb", "ParentTest::SecondChildTest#test_public", - "bundle exec ruby -Itest /fixtures/nested_minitest_tests.rb --name ParentTest::SecondChildTest#test_public", + "bundle exec ruby /fixtures/nested_minitest_tests.rb --name ParentTest::SecondChildTest#test_public", { "start_line": 14, "start_column": 4, @@ -620,7 +620,7 @@ "arguments": [ "/fixtures/nested_minitest_tests.rb", "ParentTest#test_public_again", - "bundle exec ruby -Itest /fixtures/nested_minitest_tests.rb --name ParentTest#test_public_again", + "bundle exec ruby /fixtures/nested_minitest_tests.rb --name ParentTest#test_public_again", { "start_line": 19, "start_column": 2, @@ -653,7 +653,7 @@ "arguments": [ "/fixtures/nested_minitest_tests.rb", "ParentTest#test_public_again", - "bundle exec ruby -Itest /fixtures/nested_minitest_tests.rb --name ParentTest#test_public_again", + "bundle exec ruby /fixtures/nested_minitest_tests.rb --name ParentTest#test_public_again", { "start_line": 19, "start_column": 2, @@ -686,7 +686,7 @@ "arguments": [ "/fixtures/nested_minitest_tests.rb", "ParentTest#test_public_again", - "bundle exec ruby -Itest /fixtures/nested_minitest_tests.rb --name ParentTest#test_public_again", + "bundle exec ruby /fixtures/nested_minitest_tests.rb --name ParentTest#test_public_again", { "start_line": 19, "start_column": 2, diff --git a/test/requests/code_lens_expectations_test.rb b/test/requests/code_lens_expectations_test.rb index b5c597d84..2910d1e0f 100644 --- a/test/requests/code_lens_expectations_test.rb +++ b/test/requests/code_lens_expectations_test.rb @@ -29,7 +29,7 @@ class FooTest < MiniTest::Test def test_bar; end end RUBY - uri = URI("file:///fake.rb") + uri = URI("file:///test/fake.rb") document = RubyLsp::RubyDocument.new(source: source, version: 1, uri: uri) @@ -42,16 +42,53 @@ def test_bar; end assert_equal("Run In Terminal", T.must(response[1]).command.title) assert_equal( - "bundle exec ruby -Itest /fake.rb --name \"/^FooTest(#|::)/\"", + "bundle exec ruby -Itest /test/fake.rb --name \"/^FooTest(#|::)/\"", T.must(response[1]).command.arguments[2], ) assert_equal("Run In Terminal", T.must(response[4]).command.title) assert_equal( - "bundle exec ruby -Itest /fake.rb --name FooTest#test_bar", + "bundle exec ruby -Itest /test/fake.rb --name FooTest#test_bar", T.must(response[4]).command.arguments[2], ) end + def test_command_generation_for_minitest_spec + stub_test_library("minitest") + source = <<~RUBY + class FooTest < MiniTest::Test + describe "a" do + it "b" + end + end + RUBY + uri = URI("file:///spec/fake.rb") + + document = RubyLsp::RubyDocument.new(source: source, version: 1, uri: uri) + + dispatcher = Prism::Dispatcher.new + listener = RubyLsp::Requests::CodeLens.new(@global_state, uri, dispatcher) + dispatcher.dispatch(document.parse_result.value) + response = listener.perform + + assert_equal(9, response.size) + + assert_equal("Run In Terminal", T.must(response[1]).command.title) + assert_equal( + "bundle exec ruby -Ispec /spec/fake.rb --name \"/^FooTest(#|::)/\"", + T.must(response[1]).command.arguments[2], + ) + assert_equal("Run In Terminal", T.must(response[4]).command.title) + assert_equal( + "bundle exec ruby -Ispec /spec/fake.rb --name \"/^a(#|::)/\"", + T.must(response[4]).command.arguments[2], + ) + assert_equal("Run In Terminal", T.must(response[7]).command.title) + assert_equal( + "bundle exec ruby -Ispec /spec/fake.rb --name \"/^a#test_0001_b$/\"", + T.must(response[7]).command.arguments[2], + ) + end + def test_command_generation_for_test_unit stub_test_library("test-unit") source = <<~RUBY @@ -59,7 +96,7 @@ class FooTest < Test::Unit::TestCase def test_bar; end end RUBY - uri = URI("file:///fake.rb") + uri = URI("file:///test/fake.rb") document = RubyLsp::RubyDocument.new(source: source, version: 1, uri: uri) @@ -71,10 +108,10 @@ def test_bar; end assert_equal(6, response.size) assert_equal("Run In Terminal", T.must(response[1]).command.title) - assert_equal("bundle exec ruby -Itest /fake.rb --testcase /FooTest/", T.must(response[1]).command.arguments[2]) + assert_equal("bundle exec ruby -Itest /test/fake.rb --testcase /FooTest/", T.must(response[1]).command.arguments[2]) assert_equal("Run In Terminal", T.must(response[4]).command.title) assert_equal( - "bundle exec ruby -Itest /fake.rb --testcase /FooTest/ --name test_bar", + "bundle exec ruby -Itest /test/fake.rb --testcase /FooTest/ --name test_bar", T.must(response[4]).command.arguments[2], ) end