Class: FactoryGirl::Strategy::Stub
- Inherits:
-
FactoryGirl::Strategy
- Object
- FactoryGirl::Strategy
- FactoryGirl::Strategy::Stub
- Defined in:
- lib/factory_girl/strategy/stub.rb
Overview
:nodoc:
Constant Summary collapse
- @@next_id =
1000
Instance Method Summary collapse
Methods inherited from FactoryGirl::Strategy
Instance Method Details
#association(runner) ⇒ Object
6 7 8 |
# File 'lib/factory_girl/strategy/stub.rb', line 6 def association(runner) runner.run(Strategy::Stub) end |
#result(attribute_assigner, to_create) ⇒ Object
10 11 12 13 14 15 |
# File 'lib/factory_girl/strategy/stub.rb', line 10 def result(attribute_assigner, to_create) attribute_assigner.object.tap do |result_instance| stub_database_interaction_on_result(result_instance) run_callbacks(:after_stub, result_instance) end end |