Permalink
Browse files

Remove deprecated arguments from `#verify!`

  • Loading branch information...
rafaelfranca committed Sep 15, 2017
1 parent d6b779e commit 9c6ee1bed0292fc32c23dc1c68951ae64fc510be
@@ -1,3 +1,7 @@
* Remove deprecated arguments from `#verify!`.
*Rafael Mendonça França*
* Remove deprecated argument `name` from `#indexes`.
*Rafael Mendonça França*
@@ -392,10 +392,7 @@ def requires_reloading?
# Checks whether the connection to the database is still active (i.e. not stale).
# This is done under the hood by calling #active?. If the connection
# is no longer active, then this method will reconnect to the database.
def verify!(*ignored)
if ignored.size > 0
ActiveSupport::Deprecation.warn("Passing arguments to #verify method of the connection has no effect and has been deprecated. Please remove all arguments from the #verify method call.")
end
def verify!
reconnect! unless active?
end
@@ -65,18 +65,6 @@ def test_successful_reconnection_after_timeout_with_verify
assert @connection.active?
end
def test_verify_with_args_is_deprecated
assert_deprecated do
@connection.verify!(option: true)
end
assert_deprecated do
@connection.verify!([])
end
assert_deprecated do
@connection.verify!({})
end
end
def test_execute_after_disconnect
@connection.disconnect!

0 comments on commit 9c6ee1b

Please sign in to comment.