From d97f1670bd0437d9b08aa4dd8ea8d2127d3b72e5 Mon Sep 17 00:00:00 2001 From: bogdanvlviv Date: Fri, 8 Jun 2018 23:19:39 +0300 Subject: Inherit all actioncable's test classes from `ActionCable::TestCase` We have defined `ActionCable::TestCase` in `actioncable/test/test_helper.rb` that we can use in order to prevent code duplication and build common interface for actioncable's test. --- actioncable/test/channel/base_test.rb | 2 +- actioncable/test/channel/broadcasting_test.rb | 2 +- actioncable/test/channel/naming_test.rb | 2 +- actioncable/test/channel/periodic_timers_test.rb | 2 +- actioncable/test/channel/rejection_test.rb | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) (limited to 'actioncable/test/channel') diff --git a/actioncable/test/channel/base_test.rb b/actioncable/test/channel/base_test.rb index d368794f73..eb0e1673b0 100644 --- a/actioncable/test/channel/base_test.rb +++ b/actioncable/test/channel/base_test.rb @@ -5,7 +5,7 @@ require "minitest/mock" require "stubs/test_connection" require "stubs/room" -class ActionCable::Channel::BaseTest < ActiveSupport::TestCase +class ActionCable::Channel::BaseTest < ActionCable::TestCase class ActionCable::Channel::Base def kick @last_action = [ :kick ] diff --git a/actioncable/test/channel/broadcasting_test.rb b/actioncable/test/channel/broadcasting_test.rb index f184147c51..b2f8681892 100644 --- a/actioncable/test/channel/broadcasting_test.rb +++ b/actioncable/test/channel/broadcasting_test.rb @@ -5,7 +5,7 @@ require "active_support/testing/method_call_assertions" require "stubs/test_connection" require "stubs/room" -class ActionCable::Channel::BroadcastingTest < ActiveSupport::TestCase +class ActionCable::Channel::BroadcastingTest < ActionCable::TestCase include ActiveSupport::Testing::MethodCallAssertions class ChatChannel < ActionCable::Channel::Base diff --git a/actioncable/test/channel/naming_test.rb b/actioncable/test/channel/naming_test.rb index 6f094fbb5e..45652d9cc9 100644 --- a/actioncable/test/channel/naming_test.rb +++ b/actioncable/test/channel/naming_test.rb @@ -2,7 +2,7 @@ require "test_helper" -class ActionCable::Channel::NamingTest < ActiveSupport::TestCase +class ActionCable::Channel::NamingTest < ActionCable::TestCase class ChatChannel < ActionCable::Channel::Base end diff --git a/actioncable/test/channel/periodic_timers_test.rb b/actioncable/test/channel/periodic_timers_test.rb index 8d9482577c..d6b8992148 100644 --- a/actioncable/test/channel/periodic_timers_test.rb +++ b/actioncable/test/channel/periodic_timers_test.rb @@ -6,7 +6,7 @@ require "stubs/room" require "active_support/time" require "active_support/testing/method_call_assertions" -class ActionCable::Channel::PeriodicTimersTest < ActiveSupport::TestCase +class ActionCable::Channel::PeriodicTimersTest < ActionCable::TestCase include ActiveSupport::Testing::MethodCallAssertions class ChatChannel < ActionCable::Channel::Base diff --git a/actioncable/test/channel/rejection_test.rb b/actioncable/test/channel/rejection_test.rb index 897efeb65a..683eafcac0 100644 --- a/actioncable/test/channel/rejection_test.rb +++ b/actioncable/test/channel/rejection_test.rb @@ -5,7 +5,7 @@ require "minitest/mock" require "stubs/test_connection" require "stubs/room" -class ActionCable::Channel::RejectionTest < ActiveSupport::TestCase +class ActionCable::Channel::RejectionTest < ActionCable::TestCase class SecretChannel < ActionCable::Channel::Base def subscribed reject if params[:id] > 0 -- cgit v1.2.3