Rails Engine + Mongoid: Aucune configuration n'a pu être trouvée pour une session nommée 'default'

J'ai créé un Rails de Montage Application et ajouter 'mongoid" et "rspec' du gem. Si j'essaie de lancer mon spécifications maintenant, je reçois l'erreur suivante:

Mongoid::Errors::NoSessionConfig: 
Problem:
  No configuration could be found for a session named 'default'.
Summary:
  When attempting to create the new session, Mongoid could not find a session configuration for the name: 'default'. This is necessary in order to know the host, port, and options needed to connect.
Resolution:
  Double check your mongoid.yml to make sure under the sessions key that a configuration exists for 'default'. If you have set the configuration programatically, ensure that 'default' exists in the configuration hash.

Lorsque j'ajoute le Mongoid.load!(Rails.root.join("config", "mongoid.yml")) ligne spec_helper.rb tout fonctionne normalement.

Pourquoi et comment puis-je obtenir la fonctionnalité comme dans une application Rails normale où je n'ai pas besoin d'appeler la fonction de charge?

mongoid.yml

development:
  sessions:
    default:
      database: dummy_development
      hosts:
        - localhost:27017
      options:
  options:
test:
  sessions:
    default:
      database: dummy_test
      hosts:
        - localhost:27017
      options:
        consistency: :strong
        max_retries: 1
        retry_interval: 0

Versions:

gem 'rails', '~> 3.2.12'
gem 'mongoid', '~> 3.1'
gem 'rspec-rails', '~> 2.13'

source d'informationauteur wintersolutions | 2013-03-12