Skip to content

Instantly share code, notes, and snippets.

@techwhizbang
Created October 19, 2010 22:34
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save techwhizbang/635290 to your computer and use it in GitHub Desktop.
Save techwhizbang/635290 to your computer and use it in GitHub Desktop.
RSpec 2 with ActiveRecord and Mongoid together (temporary hack)
#put this in your spec_helper.rb if you're using Rails 3, Rspec2, Mongoid, and #ActiveRecord together until the "real" fix comes along
class RSpec::Core::Configuration
attr_accessor :fixture_path, :use_transactional_fixtures
def fixture_path=(path)
@fixture_path = path
end
def use_transactional_fixtures=(bool)
@use_transactional_fixtures = bool
end
end
class RSpec::Core::ExampleGroup
def fixture_path
RSpec.configuration.fixture_path
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment