Commit 39d38a25e0dd93da2a5f92d5d9af8d2c27f074e3

Authored by Cyril Mougel
1 parent b332048d
Exists in master and in 1 other branch production

fix test-queue with mongoid 3 [ci-skip]

Showing 1 changed file with 3 additions and 1 deletions   Show diff stats
script/rspec-queue-mongoid.rb
... ... @@ -9,7 +9,9 @@ require 'test_queue/runner/rspec'
9 9 class MongoidRspecRunner < TestQueue::Runner::RSpec
10 10 def after_fork(num)
11 11 super
12   - Mongoid.master = Mongoid.master.connection.db(Mongoid.master.name + "_#{num}")
  12 + Mongoid.override_database(
  13 + "#{Mongoid.session(:default).options[:database]}_#{num}"
  14 + )
13 15 end
14 16 end
15 17  
... ...