diff --git a/lib/rubocop/rspec/expect_offense.rb b/lib/rubocop/rspec/expect_offense.rb index 86e4b78bb2cd..3546b3a3133d 100644 --- a/lib/rubocop/rspec/expect_offense.rb +++ b/lib/rubocop/rspec/expect_offense.rb @@ -212,7 +212,7 @@ def set_formatter_options # Parsed representation of code annotated with the `^^^ Message` style class AnnotatedSource - ANNOTATION_PATTERN = /\A\s*(\^+|\^{}) /.freeze + ANNOTATION_PATTERN = /\A\s*(\^+|\^{}) ?/.freeze ABBREV = "[...]\n" # @param annotated_source [String] string passed to the matchers