-
Type: Task
-
Resolution: Done
-
Affects Version/s: None
-
Component/s: None
-
None
When you put 'mongoid' gem v.3.0.5 in your gemfile (to use it along with ActiveRecord),
#Gemfile gem 'mongoid', '3.0.5' gem 'rspec-rails', group:test
you can not run rspec tests, coz they doesn't recreate your database:
$ rake --trace -n #no rake db:test:prepare in the output
possible workaround :
#Gemfile gem 'mongoid', '3.0.5', require:false gem 'rspec-rails', group:test #config/application.rb require 'mongoid' # or require 'mongoid/railtie' require 'rails' $ rake --trace -n #db:test:prepare is in the output
Line that changes this behaviour is in the lib/mongoid/railtie.rb
config.send(generator).orm :mongoid, migration: false
Can't say more if it's desired behaviour, or how it can be corrected (