aboutsummaryrefslogtreecommitdiffstats
path: root/actioncable/test/subscription_adapter
diff options
context:
space:
mode:
authorKasper Timm Hansen <kaspth@gmail.com>2016-03-26 21:49:18 +0100
committerKasper Timm Hansen <kaspth@gmail.com>2016-03-26 21:49:18 +0100
commitdacfdf03d34b8f9a3b81ef2219bf49307f90257e (patch)
treee0e9478584b2251dfc6067c07d975c4d68dd525b /actioncable/test/subscription_adapter
parentf6b4bf6593f2e69ef5ea27089f1a314b5dc28c2d (diff)
downloadrails-dacfdf03d34b8f9a3b81ef2219bf49307f90257e.tar.gz
rails-dacfdf03d34b8f9a3b81ef2219bf49307f90257e.tar.bz2
rails-dacfdf03d34b8f9a3b81ef2219bf49307f90257e.zip
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.
Diffstat (limited to 'actioncable/test/subscription_adapter')
-rw-r--r--actioncable/test/subscription_adapter/postgresql_test.rb1
1 files changed, 1 insertions, 0 deletions
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