Skip to content

Speed up your unit tests

ianterrell edited this page Jan 21, 2011 · 2 revisions

In your configuration (devise.rb initializer), set the number of stretches to 1 for your test environment:

config.stretches = Rails.env.test? ? 1 : 10

This will increase performance dramatically if you use bcrypt and create a lot of users (i.e. you use FactoryGirl or Machinist).

Clone this wiki locally