Class: FactoryGirl::Strategy::Stub

Inherits:
Object
  • Object
show all
Defined in:
lib/factory_girl/strategy/stub.rb

Constant Summary

@@next_id =
1000

Instance Method Summary collapse

Instance Method Details

#association(runner) ⇒ Object



6
7
8
# File 'lib/factory_girl/strategy/stub.rb', line 6

def association(runner)
  runner.run(:build_stubbed)
end

#result(evaluation) ⇒ Object



10
11
12
13
14
15
# File 'lib/factory_girl/strategy/stub.rb', line 10

def result(evaluation)
  evaluation.object.tap do |instance|
    stub_database_interaction_on_result(instance)
    evaluation.notify(:after_stub, instance)
  end
end