From 0a81cea9174d154e60eb748ae34e7237cf7b00de Mon Sep 17 00:00:00 2001 From: ydah <13041216+ydah@users.noreply.github.com> Date: Wed, 22 Feb 2023 19:48:46 +0900 Subject: [PATCH] Correct `InternalAffairs/ProcessedSourceBufferName` cop The CI running RuboCop in Edge is failed. We correct offense for `InternalAffairs/ProcessedSourceBufferName` cop. https://github.com/rubocop/rubocop-rspec/actions/runs/4241877273/jobs/7372656638 Follow up: https://github.com/rubocop/rubocop/pull/11606 ``` lib/rubocop/cop/rspec/file_path.rb:168:45: C: [Correctable] InternalAffairs/ProcessedSourceBufferName: Use file_path instead. File.expand_path(processed_source.buffer.name) ^^^^^^^^^^^ 277 files inspected, 1 offense detected, 1 offense autocorrectable Error: Process completed with exit code 1. ``` --- lib/rubocop/cop/rspec/file_path.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rubocop/cop/rspec/file_path.rb b/lib/rubocop/cop/rspec/file_path.rb index ed4fbf444..aa1c19bb6 100644 --- a/lib/rubocop/cop/rspec/file_path.rb +++ b/lib/rubocop/cop/rspec/file_path.rb @@ -165,7 +165,7 @@ def routing_spec_path? end def expanded_file_path - File.expand_path(processed_source.buffer.name) + File.expand_path(processed_source.file_path) end end end