my test_environment:
Rails 4.2.5.2
Mongoid (5.1.1)
Mongo (2.1.2)
Rspec 3
Rspec tests running very slow(ridiculously slow) i have nearly 12 tests and it takes like 17 minutes to finish.I've tried to resolve this issue myself and I've install 'gem ruby-prof' and found out that 77% of all my time (running 1 test) takes 'sleep' from Mongo::Server#run! (please check attachment)
Rspec config file:
Rspec.concfigure do |config|
config.before(:each) do
DatabaseCleaner.start
Mongoid::Clients.default.collection.select
.each(&:drop)
end
end