Use build_stubbed instead of build in FactoryGirl
build_stubbed will never hit the database, whereas build does for associations... much faster!
http://robots.thoughtbot.com/post/22670085288/use-factory-girls-build-stubbed-for-a-faster-test
Written by Sean Geoghegan
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Ruby
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#