aboutsummaryrefslogtreecommitdiffstats
path: root/actioncable/test/connection
diff options
context:
space:
mode:
authorDaniel Colson <danieljamescolson@gmail.com>2018-01-25 18:14:09 -0500
committerDaniel Colson <danieljamescolson@gmail.com>2018-01-25 23:32:59 -0500
commit94333a4c31bd10c1f358c538a167e6a4589bae2d (patch)
tree9106c349180bbdcba2e7839e0e79144e3a15a055 /actioncable/test/connection
parent211adb47e76b358ea15a3f756431c042ab231c23 (diff)
downloadrails-94333a4c31bd10c1f358c538a167e6a4589bae2d.tar.gz
rails-94333a4c31bd10c1f358c538a167e6a4589bae2d.tar.bz2
rails-94333a4c31bd10c1f358c538a167e6a4589bae2d.zip
Use assert_predicate and assert_not_predicate
Diffstat (limited to 'actioncable/test/connection')
-rw-r--r--actioncable/test/connection/base_test.rb6
-rw-r--r--actioncable/test/connection/subscriptions_test.rb6
2 files changed, 6 insertions, 6 deletions
diff --git a/actioncable/test/connection/base_test.rb b/actioncable/test/connection/base_test.rb
index 99488e38c8..c69d4d0b36 100644
--- a/actioncable/test/connection/base_test.rb
+++ b/actioncable/test/connection/base_test.rb
@@ -39,10 +39,10 @@ class ActionCable::Connection::BaseTest < ActionCable::TestCase
connection = open_connection
connection.process
- assert connection.websocket.possible?
+ assert_predicate connection.websocket, :possible?
wait_for_async
- assert connection.websocket.alive?
+ assert_predicate connection.websocket, :alive?
end
end
@@ -95,7 +95,7 @@ class ActionCable::Connection::BaseTest < ActionCable::TestCase
statistics = connection.statistics
- assert statistics[:identifier].blank?
+ assert_predicate statistics[:identifier], :blank?
assert_kind_of Time, statistics[:started_at]
assert_equal [], statistics[:subscriptions]
end
diff --git a/actioncable/test/connection/subscriptions_test.rb b/actioncable/test/connection/subscriptions_test.rb
index 149a40604a..cc2f4a2938 100644
--- a/actioncable/test/connection/subscriptions_test.rb
+++ b/actioncable/test/connection/subscriptions_test.rb
@@ -45,7 +45,7 @@ class ActionCable::Connection::SubscriptionsTest < ActionCable::TestCase
setup_connection
@subscriptions.execute_command "command" => "subscribe"
- assert @subscriptions.identifiers.empty?
+ assert_predicate @subscriptions.identifiers, :empty?
end
end
@@ -58,7 +58,7 @@ class ActionCable::Connection::SubscriptionsTest < ActionCable::TestCase
channel.expects(:unsubscribe_from_channel)
@subscriptions.execute_command "command" => "unsubscribe", "identifier" => @chat_identifier
- assert @subscriptions.identifiers.empty?
+ assert_predicate @subscriptions.identifiers, :empty?
end
end
@@ -67,7 +67,7 @@ class ActionCable::Connection::SubscriptionsTest < ActionCable::TestCase
setup_connection
@subscriptions.execute_command "command" => "unsubscribe"
- assert @subscriptions.identifiers.empty?
+ assert_predicate @subscriptions.identifiers, :empty?
end
end