aboutsummaryrefslogtreecommitdiffstats
path: root/actioncable/test/subscription_adapter
diff options
context:
space:
mode:
authorRyuta Kamizono <kamipo@gmail.com>2017-07-03 00:16:53 +0900
committerRyuta Kamizono <kamipo@gmail.com>2017-07-03 00:16:53 +0900
commit6aa658e329e54f94519268a02b29dc102b415c07 (patch)
treec20dd46d904df148114a02f7fcd6dcd2285539a4 /actioncable/test/subscription_adapter
parenta8427bbb15508bc23eb05c273692bd21b37ec195 (diff)
downloadrails-6aa658e329e54f94519268a02b29dc102b415c07.tar.gz
rails-6aa658e329e54f94519268a02b29dc102b415c07.tar.bz2
rails-6aa658e329e54f94519268a02b29dc102b415c07.zip
Remove redundant `assert_respond_to`
It is covered by following assertion.
Diffstat (limited to 'actioncable/test/subscription_adapter')
-rw-r--r--actioncable/test/subscription_adapter/base_test.rb16
1 files changed, 3 insertions, 13 deletions
diff --git a/actioncable/test/subscription_adapter/base_test.rb b/actioncable/test/subscription_adapter/base_test.rb
index 212ea49d2f..5793415b5f 100644
--- a/actioncable/test/subscription_adapter/base_test.rb
+++ b/actioncable/test/subscription_adapter/base_test.rb
@@ -39,35 +39,25 @@ class ActionCable::SubscriptionAdapter::BaseTest < ActionCable::TestCase
# TEST METHODS THAT ARE REQUIRED OF THE ADAPTER'S BACKEND STORAGE OBJECT
test "#broadcast is implemented" do
- broadcast = SuccessAdapter.new(@server).broadcast("channel", "payload")
-
- assert_respond_to(SuccessAdapter.new(@server), :broadcast)
-
assert_nothing_raised do
- broadcast
+ SuccessAdapter.new(@server).broadcast("channel", "payload")
end
end
test "#subscribe is implemented" do
callback = lambda { puts "callback" }
success_callback = lambda { puts "success" }
- subscribe = SuccessAdapter.new(@server).subscribe("channel", callback, success_callback)
-
- assert_respond_to(SuccessAdapter.new(@server), :subscribe)
assert_nothing_raised do
- subscribe
+ SuccessAdapter.new(@server).subscribe("channel", callback, success_callback)
end
end
test "#unsubscribe is implemented" do
callback = lambda { puts "callback" }
- unsubscribe = SuccessAdapter.new(@server).unsubscribe("channel", callback)
-
- assert_respond_to(SuccessAdapter.new(@server), :unsubscribe)
assert_nothing_raised do
- unsubscribe
+ SuccessAdapter.new(@server).unsubscribe("channel", callback)
end
end
end