diff options
author | Rafael França <rafaelmfranca@gmail.com> | 2018-06-08 18:54:57 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-08 18:54:57 -0400 |
commit | 9204c0c5fa96acc2474eaadc8fa538c7f90d7219 (patch) | |
tree | 1e1a6d50191431a71a334b393fd320c948a9f4c5 /actioncable/test/channel | |
parent | 34b16ce86526c9b8ce9abfe1190eadd0caf7be49 (diff) | |
parent | 74a9a2927774e21b62913eca9103be78515a4719 (diff) | |
download | rails-9204c0c5fa96acc2474eaadc8fa538c7f90d7219.tar.gz rails-9204c0c5fa96acc2474eaadc8fa538c7f90d7219.tar.bz2 rails-9204c0c5fa96acc2474eaadc8fa538c7f90d7219.zip |
Merge pull request #33102 from bogdanvlviv/refactor-actioncable-tests
Refactor actioncable's tests
Diffstat (limited to 'actioncable/test/channel')
-rw-r--r-- | actioncable/test/channel/base_test.rb | 2 | ||||
-rw-r--r-- | actioncable/test/channel/broadcasting_test.rb | 5 | ||||
-rw-r--r-- | actioncable/test/channel/naming_test.rb | 2 | ||||
-rw-r--r-- | actioncable/test/channel/periodic_timers_test.rb | 5 | ||||
-rw-r--r-- | actioncable/test/channel/rejection_test.rb | 2 | ||||
-rw-r--r-- | actioncable/test/channel/stream_test.rb | 3 |
6 files changed, 5 insertions, 14 deletions
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..2cbfabc1d0 100644 --- a/actioncable/test/channel/broadcasting_test.rb +++ b/actioncable/test/channel/broadcasting_test.rb @@ -1,13 +1,10 @@ # frozen_string_literal: true require "test_helper" -require "active_support/testing/method_call_assertions" require "stubs/test_connection" require "stubs/room" -class ActionCable::Channel::BroadcastingTest < ActiveSupport::TestCase - include ActiveSupport::Testing::MethodCallAssertions - +class ActionCable::Channel::BroadcastingTest < ActionCable::TestCase class ChatChannel < ActionCable::Channel::Base end 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..0c979f4c7c 100644 --- a/actioncable/test/channel/periodic_timers_test.rb +++ b/actioncable/test/channel/periodic_timers_test.rb @@ -4,11 +4,8 @@ require "test_helper" require "stubs/test_connection" require "stubs/room" require "active_support/time" -require "active_support/testing/method_call_assertions" - -class ActionCable::Channel::PeriodicTimersTest < ActiveSupport::TestCase - include ActiveSupport::Testing::MethodCallAssertions +class ActionCable::Channel::PeriodicTimersTest < ActionCable::TestCase class ChatChannel < ActionCable::Channel::Base # Method name arg periodically :send_updates, every: 1 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 diff --git a/actioncable/test/channel/stream_test.rb b/actioncable/test/channel/stream_test.rb index ed42f1acd4..bfe1f92946 100644 --- a/actioncable/test/channel/stream_test.rb +++ b/actioncable/test/channel/stream_test.rb @@ -1,7 +1,6 @@ # frozen_string_literal: true require "test_helper" -require "active_support/testing/method_call_assertions" require "minitest/mock" require "stubs/test_connection" require "stubs/room" @@ -164,8 +163,6 @@ module ActionCable::StreamTests end class StreamFromTest < ActionCable::TestCase - include ActiveSupport::Testing::MethodCallAssertions - setup do @server = TestServer.new(subscription_adapter: ActionCable::SubscriptionAdapter::Async) @server.config.allowed_request_origins = %w( http://rubyonrails.com ) |