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