Autofix Rubocop Style/PreferredHashMethods (#23851)
This commit is contained in:
parent
994cb73f56
commit
6d0a49f4a4
2 changed files with 1 additions and 9 deletions
|
@ -2050,14 +2050,6 @@ Style/OptionalBooleanParameter:
|
||||||
- 'app/workers/unfollow_follow_worker.rb'
|
- 'app/workers/unfollow_follow_worker.rb'
|
||||||
- 'lib/mastodon/redis_config.rb'
|
- 'lib/mastodon/redis_config.rb'
|
||||||
|
|
||||||
# Offense count: 1
|
|
||||||
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
||||||
# Configuration parameters: EnforcedStyle.
|
|
||||||
# SupportedStyles: short, verbose
|
|
||||||
Style/PreferredHashMethods:
|
|
||||||
Exclude:
|
|
||||||
- 'spec/support/matchers/model/model_have_error_on_field.rb'
|
|
||||||
|
|
||||||
# Offense count: 5
|
# Offense count: 5
|
||||||
# This cop supports unsafe autocorrection (--autocorrect-all).
|
# This cop supports unsafe autocorrection (--autocorrect-all).
|
||||||
# Configuration parameters: Methods.
|
# Configuration parameters: Methods.
|
||||||
|
|
|
@ -4,7 +4,7 @@ RSpec::Matchers.define :model_have_error_on_field do |expected|
|
||||||
match do |record|
|
match do |record|
|
||||||
record.valid? if record.errors.empty?
|
record.valid? if record.errors.empty?
|
||||||
|
|
||||||
record.errors.has_key?(expected)
|
record.errors.key?(expected)
|
||||||
end
|
end
|
||||||
|
|
||||||
failure_message do |record|
|
failure_message do |record|
|
||||||
|
|
Loading…
Reference in a new issue