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

2012-06-29 Thread Dennis Kuczynski
is in the queue after the commit completes. -Dennis On Thursday, June 28, 2012 9:48:47 PM UTC-4, dchel...@gmail.com wrote: On Thu, Jun 28, 2012 at 2:11 PM, Dennis Kuczynski dennis.kuczyn...@gmail.com wrote: In an ActiveRecord model, I have an after_commit callback (:enqueue_job) which places

[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