Re: [rspec-users] Issue when testing ActiveRecord after_commit callbacks

2012-06-28 Thread David Chelimsky
On Thu, Jun 28, 2012 at 2:11 PM, Dennis Kuczynski wrote: > In an ActiveRecord model, I have an after_commit callback (:enqueue_job) > which places a job on my background processing queue (Sidekiq) > > To test that the callback was firing when the database transaction > was committed, I was using:

[rspec-users] Issue when testing ActiveRecord after_commit callbacks

2012-06-28 Thread Dennis Kuczynski
In an ActiveRecord model, I have an after_commit callback (:enqueue_job) which places a job on my background processing queue (Sidekiq) To test that the callback was firing when the database transaction was committed, I was using: object.should_receive(:enqueue_job) #should pass Which seems to w