File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -293,7 +293,9 @@ class SpecialCharsTest < ActiveSupport::TestCase
293293 end
294294
295295 test "resolve test escapes file paths inside directories" do
296- Dir . stubs ( :glob ) . returns ( [ "/test/example(v2)_test.rb" ] )
296+ base_dir = Gem . win_platform? ? "D:/test" : "/test"
297+ test_path = File . join ( base_dir , "example(v2)_test.rb" )
298+ Dir . stubs ( :glob ) . returns ( [ test_path ] )
297299
298300 with_server do |server |
299301 sleep ( 0.1 ) while RubyLsp ::Addon . addons . first . instance_variable_get ( :@rails_runner_client ) . is_a? ( NullClient )
@@ -318,7 +320,7 @@ class SpecialCharsTest < ActiveSupport::TestCase
318320 response = result . response
319321
320322 assert_equal (
321- [ "#{ RailsTestStyle ::BASE_COMMAND } /test/example \\ (v2 \\ )_test.rb " ] ,
323+ [ "#{ RailsTestStyle ::BASE_COMMAND } #{ Shellwords . escape ( test_path ) } " ] ,
322324 response [ :commands ] ,
323325 )
324326 end
You can’t perform that action at this time.
0 commit comments