Module: FactoryGirl::Rspec::With
- Defined in:
- lib/factory_girl/rspec/with.rb
Instance Method Summary collapse
-
#with(*args) ⇒ Object
define an rspec helper method that lazily creates the referenced FactoryGirl fixture (via let) example usage: with :user.
-
#with!(*args) ⇒ Object
define an rspec helper method that eagerly creates the referenced FactoryGirl fixture (via let!) example usage: with! :user.
Instance Method Details
#with(*args) ⇒ Object
define an rspec helper method that lazily creates the referenced FactoryGirl fixture (via let) example usage:
with :user
10 11 12 |
# File 'lib/factory_girl/rspec/with.rb', line 10 def with(*args) register_factory 'let', *args end |
#with!(*args) ⇒ Object
define an rspec helper method that eagerly creates the referenced FactoryGirl fixture (via let!) example usage:
with! :user
18 19 20 |
# File 'lib/factory_girl/rspec/with.rb', line 18 def with!(*args) register_factory 'let!', *args end |