Class: TestProf::FactoryProf::FactoryBuilders::Fabrication

Inherits:
Object
  • Object
show all
Defined in:
lib/test_prof/factory_prof/factory_builders/fabrication.rb

Overview

implementation of #patch and #track methods to provide unified interface for all factory-building gems

Class Method Summary collapse

Class Method Details

.patchObject

Monkey-patch Fabrication



12
13
14
15
16
# File 'lib/test_prof/factory_prof/factory_builders/fabrication.rb', line 12

def self.patch
  TestProf.require 'fabrication' do
    ::Fabricate.singleton_class.prepend(FabricationPatch)
  end
end

.track(factory, &block) ⇒ Object



18
19
20
# File 'lib/test_prof/factory_prof/factory_builders/fabrication.rb', line 18

def self.track(factory, &block)
  FactoryProf.track(factory, &block)
end