Skip to content

Commit

Permalink
Fix deprecation warning on latest Mongo Ruby Driver
Browse files Browse the repository at this point in the history
  • Loading branch information
Jacques Crocker committed Aug 4, 2010
1 parent 6d611b5 commit d15a8c1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/mongoid/config.rb
Expand Up @@ -192,7 +192,7 @@ def add_language(language_code = nil)
# <tt>Mongoid.reconnect!</tt>
def reconnect!(now = true)
if now
master.connection.connect_to_master
master.connection.connect
else
# We set a @reconnect flag so that #master knows to reconnect the next
# time the connection is accessed.
Expand Down
4 changes: 2 additions & 2 deletions spec/unit/mongoid/config_spec.rb
Expand Up @@ -240,14 +240,14 @@

context "default" do
it "reconnects on the master connection" do
@connection.expects(:connect_to_master).returns(true)
@connection.expects(:connect).returns(true)
config.reconnect!
end
end

context "now=true" do
it "reconnects on the master connection" do
@connection.expects(:connect_to_master).returns(true)
@connection.expects(:connect).returns(true)
config.reconnect!(true)
end
end
Expand Down

0 comments on commit d15a8c1

Please sign in to comment.