We had to set `config.stretches = 10` to keep it the same value as it was within the `Restful-Auth` plugin (if we don't then user authentication fails). This works well for staging/production environments.

However, when doing the automated tests, while running `rake db:test:prepare`, `Rails.env.test?` returns `false` (as it still detects the rails environment as `development`) and uses the value of `config.stretches` as `10`. The same `Rails.env.test?` returns `true` in the test phase (`rspec spec` or `rake cucumber`) and uses the `config.stretches` value as `1` and tests start failing (as login authentication starts failing). You may also want to note here that the `db:test:prepare` task in turn calls the `create_default_users` task which is populating the user data and is actually using the `config.stretches` value.

We can assume that `rake db:test:prepare` should always be run within a `test` environment and keep the conditional code suggested in the comments or we can keep the value as `1` for _any_ environment except `production` or `staging`. Thoughts?