[rspec-users] Rails 3 / RSpec 2 use_transactional_fixtures and after_commit

Kurt ks at cissor.com
Tue Feb 8 20:32:24 EST 2011

We're just running into it now, but we're using after_commit in Rails 3 for 
the first time.  The callback appears not to fire in our specs -- I noticed 
your posting but have not had luck getting the gem to load.  Bundler 1.0.7 
requires the gem, and it generates this:

/Users/kurtsnyder/.rvm/gems/ree-1.8.7-2010.02 at rails3/gems/after_commit-1.0.7/lib/after_commit/active_record.rb:15:in 
`include_after_commit_extensions': undefined method `subclasses_of' for 
Object:Class (NoMethodError)
/Users/kurtsnyder/.rvm/gems/ree-1.8.7-2010.02 at rails3/gems/after_commit-1.0.7/lib/after_commit.rb:81

Did you add these two lines to your spec_helper.rb file or somewhere else?

ActiveRecord::Base.send(:include, AfterCommit::AfterSavepoint)

I'd be interested in helping to get this to work, but not sure where to 
start as we're new to after_commit.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20110208/c8a7a859/attachment.html>

More information about the rspec-users mailing list