Prabs
Prabs

Reputation: 46

How to use `create` instead of `FactoryGirl.create` on rails console

For rails 3, rspec 2.6

I am able to use create instead of FactoryGirl.create in Rspec.

While verifying the working of factories, every time there is need to append FactotyGirl before create, which is taking more time in console.

Please provide a feedback, how we can use 'create' in console?

Upvotes: 0

Views: 36

Answers (1)

rhunal
rhunal

Reputation: 415

Just use below in console:

include FactoryGirl::Syntax::Methods

Upvotes: 1

Related Questions