Module: FactoryGirl::Syntax::Vintage
- Defined in:
- lib/factory_girl/syntax/vintage.rb
Instance Method Summary collapse
-
#Factory(name, attrs = {}) ⇒ Object
Shortcut for Factory.create.
Instance Method Details
#Factory(name, attrs = {}) ⇒ Object
Shortcut for Factory.create.
Example:
Factory(:user, name: 'Joe')
124 125 126 127 |
# File 'lib/factory_girl/syntax/vintage.rb', line 124 def Factory(name, attrs = {}) ActiveSupport::Deprecation.warn "Factory(:name) is deprecated; use FactoryGirl.create(:name) instead.", caller FactoryGirl.create(name, attrs) end |