mirror of
https://github.com/thoughtbot/factory_bot.git
synced 2022-11-09 11:43:51 -05:00
Adjust for split from Style/MethodMissing into two cops
In this PR the cop Style/MethodMissing was split into Style/MethodMissingSuper and Style/MissingRespondToMissing. https://github.com/rubocop-hq/rubocop/pull/5811 This commit goes through the disables and updates them to reflect the appropriate new Cops.
This commit is contained in:
parent
0e7c6e60f1
commit
cef7ec75b8
4 changed files with 4 additions and 4 deletions
|
@ -6,7 +6,7 @@ module FactoryBot
|
|||
@component = component
|
||||
end
|
||||
|
||||
def method_missing(name, *args, &block) # rubocop:disable Style/MethodMissing
|
||||
def method_missing(name, *args, &block) # rubocop:disable Style/MethodMissingSuper
|
||||
@component.send(name, *args, &block)
|
||||
end
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ module FactoryBot
|
|||
@invoked_methods = []
|
||||
end
|
||||
|
||||
def method_missing(name, *args, &block) # rubocop:disable Style/MethodMissing
|
||||
def method_missing(name, *args, &block) # rubocop:disable Style/MissingRespondToMissing
|
||||
@invoked_methods << name
|
||||
super
|
||||
end
|
||||
|
|
|
@ -88,7 +88,7 @@ module FactoryBot
|
|||
# end
|
||||
#
|
||||
# are equivalent.
|
||||
def method_missing(name, *args, &block) # rubocop:disable Style/MethodMissing
|
||||
def method_missing(name, *args, &block) # rubocop:disable Style/MissingRespondToMissing, Style/MethodMissingSuper, Metrics/LineLength
|
||||
association_options = args.first
|
||||
|
||||
if association_options.nil?
|
||||
|
|
|
@ -37,7 +37,7 @@ module FactoryBot
|
|||
@instance = object_instance
|
||||
end
|
||||
|
||||
def method_missing(method_name, *args, &block) # rubocop:disable Style/MethodMissing
|
||||
def method_missing(method_name, *args, &block) # rubocop:disable Style/MethodMissingSuper
|
||||
if @instance.respond_to?(method_name)
|
||||
@instance.send(method_name, *args, &block)
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue