diff options
author | Vitali Tatarintev <vtatarintev@gitlab.com> | 2019-08-22 11:57:33 +0200 |
---|---|---|
committer | Vitali Tatarintev <vtatarintev@gitlab.com> | 2019-08-28 08:43:47 +0200 |
commit | 3a71ab523ebe9e8d30aabbf12e659eb75036d0b5 (patch) | |
tree | ac3fa7050f31f2a255c773f814a441a1447e3ae8 /rubocop | |
parent | 4f2ac51644754f9a4d4df697ac8984180b0bfdca (diff) | |
download | gitlab-ce-3a71ab523ebe9e8d30aabbf12e659eb75036d0b5.tar.gz |
Autocorrect `be_success` to `be_successful`
Diffstat (limited to 'rubocop')
-rw-r--r-- | rubocop/cop/rspec/be_success_matcher.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/rubocop/cop/rspec/be_success_matcher.rb b/rubocop/cop/rspec/be_success_matcher.rb index a137e2dba69..4ca1a7190b0 100644 --- a/rubocop/cop/rspec/be_success_matcher.rb +++ b/rubocop/cop/rspec/be_success_matcher.rb @@ -44,6 +44,12 @@ module RuboCop add_offense(node, location: :expression, message: MESSAGE) end + + def autocorrect(node) + lambda do |corrector| + corrector.insert_after(node.loc.expression, "ful") + end + end end end end |