WinstonYW

Just Another Tech Journal

Projects

Elsewhere

Test After Commit

20 MARCH 2013

Sometimes, you will need to test the after_commit call back in Rails. Really.

Such as when you are using Devise, and you want to send your emails asynchronously through Devise's recommendation.

Assuming that you are also using RSpec and transactional fixtures, then test_after_commit is what you will need.

The RubyGem works as expected and bundle install is eaaaaasy.

comments powered by Disqus