Skip to content

Commit

Permalink
fix test-queue with mongoid 3 [ci-skip]
Browse files Browse the repository at this point in the history
  • Loading branch information
shingara committed Oct 14, 2013
1 parent b332048 commit 39d38a2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion script/rspec-queue-mongoid.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
class MongoidRspecRunner < TestQueue::Runner::RSpec
def after_fork(num)
super
Mongoid.master = Mongoid.master.connection.db(Mongoid.master.name + "_#{num}")
Mongoid.override_database(
"#{Mongoid.session(:default).options[:database]}_#{num}"
)
end
end

Expand Down

0 comments on commit 39d38a2

Please sign in to comment.