I'm currently using Rails 3.2.11 with Mongoid 3.0.17 (moped 1.3.2, origin 1.0.11) and when I open the Rails console in the "test" environment the Mongoid::Session.default.collections is empty. However, if I start the console in "development" the collections array is not empty.
Here's the mongoid.yml:
I became aware of this problem when a spec failed b/c of a validation error. I noticed the collections weren't being emptied (even though I was calling Mongoid.truncate!.
I fired up the rails console:
rails c test
I can also get the collection from a model and access its session, however, that still shows no collections from it:
Any idea why the collections array is empty in "test" and not in "development"? I confirmed it is connected to the correct database and that data exists in the collections by doing a count on one of my models.