Created
October 19, 2010 22:34
-
-
Save techwhizbang/635290 to your computer and use it in GitHub Desktop.
RSpec 2 with ActiveRecord and Mongoid together (temporary hack)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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