Skip to content

Commit

Permalink
Configuring mongo
Browse files Browse the repository at this point in the history
  • Loading branch information
benhutton committed Jan 22, 2012
1 parent 364d99b commit 02f1c95
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
4 changes: 4 additions & 0 deletions config/application.rb
Expand Up @@ -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.
Expand Down
10 changes: 10 additions & 0 deletions 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'] %>

0 comments on commit 02f1c95

Please sign in to comment.