@@ -229,6 +229,8 @@ def test_jumping_to_method_definitions_when_declaration_exists
229229
230230 uri = URI ( "file:///folder/fake.rb" )
231231 source = <<~RUBY
232+ # typed: false
233+
232234 class A
233235 def bar
234236 foo
@@ -246,10 +248,9 @@ def foo; end
246248 RubyIndexer ::IndexablePath . new ( nil , T . must ( uri . to_standardized_path ) ) , source
247249 )
248250
249- stub_no_typechecker
250251 response = executor . execute ( {
251252 method : "textDocument/definition" ,
252- params : { textDocument : { uri : "file:///folder/fake.rb" } , position : { character : 4 , line : 2 } } ,
253+ params : { textDocument : { uri : "file:///folder/fake.rb" } , position : { character : 4 , line : 4 } } ,
253254 } ) . response
254255
255256 assert_equal ( uri . to_s , response . attributes [ :uri ] )
@@ -263,6 +264,8 @@ def test_jumping_to_method_method_calls_on_explicit_self
263264
264265 uri = URI ( "file:///folder/fake.rb" )
265266 source = <<~RUBY
267+ # typed: false
268+
266269 class A
267270 def bar
268271 self.foo
@@ -280,10 +283,9 @@ def foo; end
280283 RubyIndexer ::IndexablePath . new ( nil , T . must ( uri . to_standardized_path ) ) , source
281284 )
282285
283- stub_no_typechecker
284286 response = executor . execute ( {
285287 method : "textDocument/definition" ,
286- params : { textDocument : { uri : "file:///folder/fake.rb" } , position : { character : 9 , line : 2 } } ,
288+ params : { textDocument : { uri : "file:///folder/fake.rb" } , position : { character : 9 , line : 4 } } ,
287289 } ) . response
288290
289291 assert_equal ( uri . to_s , response . attributes [ :uri ] )
@@ -297,6 +299,8 @@ def test_jumping_to_method_definitions_when_declaration_does_not_exist
297299
298300 uri = URI ( "file:///folder/fake.rb" )
299301 source = <<~RUBY
302+ # typed: false
303+
300304 class A
301305 def bar
302306 foo
@@ -312,10 +316,9 @@ def bar
312316 RubyIndexer ::IndexablePath . new ( nil , T . must ( uri . to_standardized_path ) ) , source
313317 )
314318
315- stub_no_typechecker
316319 response = executor . execute ( {
317320 method : "textDocument/definition" ,
318- params : { textDocument : { uri : "file:///folder/fake.rb" } , position : { character : 4 , line : 2 } } ,
321+ params : { textDocument : { uri : "file:///folder/fake.rb" } , position : { character : 4 , line : 4 } } ,
319322 } ) . response
320323
321324 assert_nil ( response )
0 commit comments