Search code examples
rspec-rails

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?


Solution

  • Just use below in console:

    include FactoryGirl::Syntax::Methods