diff options
Diffstat (limited to 'rubocop/cop/gitlab/duplicate_spec_location.rb')
-rw-r--r-- | rubocop/cop/gitlab/duplicate_spec_location.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/rubocop/cop/gitlab/duplicate_spec_location.rb b/rubocop/cop/gitlab/duplicate_spec_location.rb index 025f75d644f..ece3b9313d9 100644 --- a/rubocop/cop/gitlab/duplicate_spec_location.rb +++ b/rubocop/cop/gitlab/duplicate_spec_location.rb @@ -25,7 +25,7 @@ module RuboCop MSG = 'Duplicate spec location in `%<path>s`.' def on_top_level_describe(node, _args) - path = file_path_for_node(node).sub(/\A#{rails_root}\//, '') + path = file_path_for_node(node).sub(%r{\A#{rails_root}/}, '') duplicate_path = find_duplicate_path(path) if duplicate_path && File.exist?(File.join(rails_root, duplicate_path)) |