diff --git a/config/application.rb b/config/application.rb index 72968fc..ecad47e 100644 --- a/config/application.rb +++ b/config/application.rb @@ -15,6 +15,10 @@ # Bundler.require(:default, :assets, Rails.env) end + ENV["RACK_ENV"] = Rails.env # had to explicity state the test environment (or cucumber env.) + require 'mongoid' + Mongoid.load!(File.expand_path(File.dirname(__FILE__) + '/mongoid.yml')) + module ResourceLibraryTest class Application < Rails::Application # Settings in config/environments/* take precedence over those specified here. diff --git a/config/mongoid.yml b/config/mongoid.yml new file mode 100644 index 0000000..66eb23f --- /dev/null +++ b/config/mongoid.yml @@ -0,0 +1,10 @@ +development: + host: localhost + database: resource_library_test_development + +test: + host: localhost + database: resource_library_test_test + +production: + uri: <%= ENV['MONGOHQ_URL'] %>