I’ve followed the instructions for devise_async as per the README and I’m rolling Devise 2.1.2 and delayed_job. In my cucumber tests, I no longer receive the confirmation email as part of the sign-up process. Is there something I should be doing as part of testing? I already set delayed job to skip the actual delay for testing by setting the following in my test environment.
Delayed::Worker.delay_jobs = false
But even with this set to true, it still fails, albeit more slowly. If I remove the devise_async gem and the relevant lines, everything bursts back into life.
Thanks,
Graeme
The new version of devise-async triggers the emails after the record has been committed to the database. With RSpec, each test is wrapped in a transaction by default. Does Cucumber do the same? In that case you’ll need to turn those test transactions off.
Here’s what I use for RSpec:
http://www.denniskuczynski.com/2012/06/22/changing-individual-test-configuration-based-on-passed-in-options.html