undefined_method use_transactional_fixtures when using Mongoid #254

nc opened this Issue Nov 1, 2010 · 3 comments


None yet

2 participants

nc commented Nov 1, 2010

thrown when you configure Mongoid with a project that mixes ActiveRecord with MongoDB access. are there any known workarounds?

RSpec member

rspec-rails-2.0.x only supports using one ORM or the other, but I'm hoping to be able to support multiple ORMs with rspec-rails-2.1. There are a few other issues open related to this - just search for mongoid.

RSpec member

As a workaround, you can implement the same hooks into AR that rspec-rails does. See http://github.com/rspec/rspec-rails/blob/master/lib/rspec/rails/fixture_support.rb. Something like this in your spec_helper config:

RSpec.configure do |c|
  c.add_setting :use_transactional_fixtures
  c.use_transactional_fixtures = true
RSpec member

just ask if AR is defined instead

@amatsuda amatsuda pushed a commit that referenced this issue Nov 15, 2011
@dchelimsky dchelimsky just ask if AR is defined instead
- Closes #254.
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment