Support custom port for MongoDB config

This commit is contained in:
Lucas Mazza
2014-01-03 11:23:34 -02:00
parent 0cb74efd79
commit dd95f3f3f7
2 changed files with 7 additions and 1 deletions

View File

@@ -1,7 +1,7 @@
require 'mongoid/version'
Mongoid.configure do |config|
config.connect_to("devise-test-suite")
config.load!('test/support/mongoid.yml')
config.use_utc = true
config.include_root_in_json = true
end

6
test/support/mongoid.yml Normal file
View File

@@ -0,0 +1,6 @@
test:
sessions:
default:
database: devise-test-suite
hosts:
- localhost:<%= ENV['MONGODB_PORT'] || '27017' %>