提交 dacfdf03 编写于 作者: K Kasper Timm Hansen

Cable: Shush pop warnings when skipping Postgres tests.

`skip` raises an exception to abort the execution of the test, so
`super` would never be called and thus `@rx_adapter` and `@tx_adapter`
would never have been defined at the time of teardown.

Define them just before skipping and zap the warnings.
上级 f6b4bf65
......@@ -21,6 +21,7 @@ def setup
begin
ActiveRecord::Base.connection
rescue
@rx_adapter = @tx_adapter = nil
skip "Couldn't connect to PostgreSQL: #{database_config.inspect}"
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册