Sha256: a4d25b302265c45d4eea7808da69bd861ef92b0e0217fcd889990e25cd14e3de
Contents?: true
Size: 568 Bytes
Versions: 112
Compression:
Stored size: 568 Bytes
Contents
module FactoryGirl class FactoryRunner def initialize(name, strategy, traits_and_overrides) @name = name @strategy = strategy @overrides = traits_and_overrides.extract_options! @traits = traits_and_overrides end def run(strategy_override = nil, &block) strategy_override ||= @strategy factory = FactoryGirl.factory_by_name(@name) factory.compile if @traits.any? factory = factory.with_traits(@traits) end factory.run(strategy_override, @overrides, &block) end end end
Version data entries
112 entries across 66 versions & 6 rubygems