-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
2 additions
and
3 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,13 +8,12 @@ | |
# in spec/support/ and its subdirectories. | ||
Dir[Rails.root.join("spec/support/**/*.rb")].each {|f| require f} | ||
|
||
DatabaseCleaner.orm = "mongoid" | ||
This comment has been minimized.
Sorry, something went wrong. |
||
DatabaseCleaner.strategy = :truncation | ||
|
||
RSpec.configure do |config| | ||
|
||
config.before(:suite) do | ||
DatabaseCleaner[:mongoid].strategy = :truncation | ||
This comment has been minimized.
Sorry, something went wrong.
bmabey
Author
Owner
|
||
DatabaseCleaner.clean_with(:truncation) | ||
DatabaseCleaner.clean | ||
This comment has been minimized.
Sorry, something went wrong.
bmabey
Author
Owner
|
||
end | ||
|
||
|
||
|
The problem was with the string.. DatabaseCleaner needs to call
#to_sym
, but isn't in 0.6.0. So, it should really have been:However, even this is unneeded since DatabaseCleaner is smart enough to autodetect Mongoid.