Module: TestProf::FactoryDefault::FactoryBotPatch

Defined in:
lib/test_prof/factory_default/factory_bot_patch.rb

Defined Under Namespace

Modules: RunnerExt, StrategyExt, SyntaxExt

Class Method Summary collapse

Class Method Details

.patchObject



59
60
61
62
63
64
65
66
67
# File 'lib/test_prof/factory_default/factory_bot_patch.rb', line 59

def self.patch
  return unless defined?(TestProf::FactoryBot)

  TestProf::FactoryBot::Syntax::Methods.include SyntaxExt
  TestProf::FactoryBot.extend SyntaxExt
  TestProf::FactoryBot::Strategy::Create.prepend StrategyExt
  TestProf::FactoryBot::Strategy::Build.prepend StrategyExt
  TestProf::FactoryBot::Strategy::Stub.prepend StrategyExt
end