I am working on creating a new Gem that has some models which use Mongoid. I would like to test my gem using RSpec. I have started using RSpec for writing tests. I have installed a gem called mongoid-rspec and set it up according to its documentation.
Now I need to tell Mongoid how to configure itself. Running rspec from the command line, it's now telling me that it couldn't find a mongoid.yml file and that I should run rails g mongoid:config
. Obviously this won't work since I am testing a gem.
I'm new to rspec and mongoid, so I'm not quite sure of all the things I need to do to configure it properly in this test environment. It might be as easy as creating this mongoid.yml file, but I'm not sure of the best place to put it.
Any help would be appreciated. Thanks!