mirror of
https://github.com/thoughtbot/factory_bot.git
synced 2022-11-09 11:43:51 -05:00
1b81d5dc25
What? ===== Within FactoryBot::Evaluator, the build strategy was reported either as a class OR symbol. A side-effect of this is misreporting within ActiveSupport::Notifications hooks, since the instrumentation payload may have strategies listed as e.g. `:create` or `FactoryBot::Strategy::Create`, even though they semantically represent the same information. This introduces a new instance method for all strategies, `to_sym`, to be called rather than `class`.
15 lines
191 B
Ruby
15 lines
191 B
Ruby
module FactoryBot
|
|
module Strategy
|
|
class Null
|
|
def association(runner)
|
|
end
|
|
|
|
def result(evaluation)
|
|
end
|
|
|
|
def to_sym
|
|
:null
|
|
end
|
|
end
|
|
end
|
|
end
|