Skip to content

Commit dacfdf0

Browse files
committed
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.
1 parent f6b4bf6 commit dacfdf0

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

actioncable/test/subscription_adapter/postgresql_test.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ def setup
2121
begin
2222
ActiveRecord::Base.connection
2323
rescue
24+
@rx_adapter = @tx_adapter = nil
2425
skip "Couldn't connect to PostgreSQL: #{database_config.inspect}"
2526
end
2627

0 commit comments

Comments
 (0)