Class: FactoryGirl::Proxy::Stub
- Inherits:
-
FactoryGirl::Proxy
- Object
- FactoryGirl::Proxy
- FactoryGirl::Proxy::Stub
- Defined in:
- lib/factory_girl/proxy/stub.rb
Overview
:nodoc:
Constant Summary collapse
- @@next_id =
1000
Instance Method Summary collapse
Methods inherited from FactoryGirl::Proxy
Instance Method Details
#association(factory_name, overrides = {}) ⇒ Object
6 7 8 9 |
# File 'lib/factory_girl/proxy/stub.rb', line 6 def association(factory_name, overrides = {}) factory = FactoryGirl.factory_by_name(factory_name) factory.run(Proxy::Stub, overrides.except(:method)) end |
#result(attribute_assigner, to_create) ⇒ Object
11 12 13 14 15 16 |
# File 'lib/factory_girl/proxy/stub.rb', line 11 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 |