提交 1e17a9d3 编写于 作者: S Steve Jorgensen

Fix only-once stub logic.

Didn't fail the test because adapter#query happens to
not call raw connection's #query, but don't want to count
on that and have a fragile test.
上级 c381d5cb
......@@ -92,9 +92,9 @@ def test_reconnection_after_simulated_disconnection_with_verify
def query_fake(*args)
if !( @called ||= false )
self.stubs(:status).returns(PGconn::CONNECTION_BAD)
@called = true
raise PGError
else
@called = true
self.unstub(:status)
query_unfake(*args)
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册