@@ -1058,8 +1058,6 @@ def test_edits_outside_of_declarations_do_not_trigger_indexing
10581058 end
10591059
10601060 def test_rubocop_config_changes_trigger_workspace_diagnostic_refresh
1061- uri = URI ::Generic . from_path ( path : File . join ( Dir . pwd , ".rubocop.yml" ) )
1062-
10631061 @server . process_message ( {
10641062 id : 1 ,
10651063 method : "initialize" ,
@@ -1073,22 +1071,26 @@ def test_rubocop_config_changes_trigger_workspace_diagnostic_refresh
10731071 } ,
10741072 } ,
10751073 } )
1076-
10771074 @server . global_state . index . index_all ( uris : [ ] )
1078- @server . process_message ( {
1079- method : "workspace/didChangeWatchedFiles" ,
1080- params : {
1081- changes : [
1082- {
1083- uri : uri ,
1084- type : RubyLsp ::Constant ::FileChangeType ::CHANGED ,
1085- } ,
1086- ] ,
1087- } ,
1088- } )
10891075
1090- request = find_message ( RubyLsp ::Request )
1091- assert_equal ( "workspace/diagnostic/refresh" , request . method )
1076+ [ ".rubocop.yml" , ".rubocop" , ".rubocop_todo.yml" ] . each do |config_file |
1077+ uri = URI ::Generic . from_path ( path : File . join ( Dir . pwd , config_file ) )
1078+
1079+ @server . process_message ( {
1080+ method : "workspace/didChangeWatchedFiles" ,
1081+ params : {
1082+ changes : [
1083+ {
1084+ uri : uri ,
1085+ type : RubyLsp ::Constant ::FileChangeType ::CHANGED ,
1086+ } ,
1087+ ] ,
1088+ } ,
1089+ } )
1090+
1091+ request = find_message ( RubyLsp ::Request )
1092+ assert_equal ( "workspace/diagnostic/refresh" , request . method )
1093+ end
10921094 end
10931095
10941096 def test_compose_bundle_creates_file_to_skip_next_compose
0 commit comments