From dacfdf03d34b8f9a3b81ef2219bf49307f90257e Mon Sep 17 00:00:00 2001 From: Kasper Timm Hansen Date: Sat, 26 Mar 2016 21:49:18 +0100 Subject: 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. --- actioncable/test/subscription_adapter/postgresql_test.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'actioncable') diff --git a/actioncable/test/subscription_adapter/postgresql_test.rb b/actioncable/test/subscription_adapter/postgresql_test.rb index 3b4fadbb2a..214352a0b2 100644 --- a/actioncable/test/subscription_adapter/postgresql_test.rb +++ b/actioncable/test/subscription_adapter/postgresql_test.rb @@ -21,6 +21,7 @@ class PostgresqlAdapterTest < ActionCable::TestCase begin ActiveRecord::Base.connection rescue + @rx_adapter = @tx_adapter = nil skip "Couldn't connect to PostgreSQL: #{database_config.inspect}" end -- cgit v1.2.3