Class: TestProf::FactoryProf::FactoryBuilders::FactoryBot
- Inherits:
-
Object
- Object
- TestProf::FactoryProf::FactoryBuilders::FactoryBot
- Defined in:
- lib/test_prof/factory_prof/factory_builders/factory_bot.rb
Overview
implementation of #patch and #track methods to provide unified interface for all factory-building gems
Class Method Summary collapse
-
.patch ⇒ Object
Monkey-patch FactoryBot / FactoryGirl.
- .track(strategy, factory, &block) ⇒ Object
Class Method Details
.patch ⇒ Object
Monkey-patch FactoryBot / FactoryGirl
13 14 15 16 |
# File 'lib/test_prof/factory_prof/factory_builders/factory_bot.rb', line 13 def self.patch TestProf::FactoryBot::FactoryRunner.prepend(FactoryBotPatch) if defined? TestProf::FactoryBot end |
.track(strategy, factory, &block) ⇒ Object
18 19 20 21 |
# File 'lib/test_prof/factory_prof/factory_builders/factory_bot.rb', line 18 def self.track(strategy, factory, &block) return yield unless strategy == :create FactoryProf.track(factory, &block) end |