spec/spec_helper.rb in mongoid_token-3.0.0 vs spec/spec_helper.rb in mongoid_token-4.0.0
- old
+ new
@@ -9,10 +9,12 @@
require 'mongoid_token'
ENV['MONGOID_ENV'] = "test"
RSpec.configure do |config|
+ Mongo::Logger.logger.level = Logger::ERROR
+
config.include Mongoid::Matchers
config.before(:suite) do
DatabaseCleaner.strategy = :truncation
end
@@ -21,13 +23,7 @@
Mongoid.purge!
end
end
Mongoid.configure do |config|
- config.sessions = {
- default: {
- database: "mongoid_token_test",
- hosts: [ "localhost:#{ENV['BOXEN_MONGODB_PORT'] || 27017}" ],
- options: {}
- }
- }
+ config.connect_to("mongoid_token_test", {})
end