Skip to content

Commit

Permalink
Fix a typo for Style/SingleLineMethods
Browse files Browse the repository at this point in the history
Follow #9281 (comment).

This PR fixes a typo for `Style/SingleLineMethods`.

`EnforcedStyle: allow` -> `EnforcedStyle: allow_single_line`
  • Loading branch information
koic authored and bbatsov committed Jan 26, 2021
1 parent bc2a35e commit ad6c168
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/rubocop/cop/style/single_line_methods.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module Style
#
# Endless methods added in Ruby 3.0 are also accepted by this cop.
#
# If `Style/EndlessMethod` is enabled with `EnforcedStyle: allow` or
# If `Style/EndlessMethod` is enabled with `EnforcedStyle: allow_single_line` or
# `allow_always`, single-line methods will be auto-corrected to endless
# methods if there is only one statement in the body.
#
Expand Down
4 changes: 2 additions & 2 deletions spec/rubocop/cop/style/single_line_methods_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -229,8 +229,8 @@ def some_method;#{trailing_whitespace}
end
end

context 'with `allow` style' do
let(:endless_method_config) { { 'EnforcedStyle' => 'allow' } }
context 'with `allow_single_line` style' do
let(:endless_method_config) { { 'EnforcedStyle' => 'allow_single_line' } }

it_behaves_like 'convert to endless method'
end
Expand Down

0 comments on commit ad6c168

Please sign in to comment.