aboutsummaryrefslogtreecommitdiffstats
path: root/actioncable/lib/action_cable
diff options
context:
space:
mode:
Diffstat (limited to 'actioncable/lib/action_cable')
-rw-r--r--actioncable/lib/action_cable/subscription_adapter/test.rb2
-rw-r--r--actioncable/lib/action_cable/test_helper.rb7
2 files changed, 5 insertions, 4 deletions
diff --git a/actioncable/lib/action_cable/subscription_adapter/test.rb b/actioncable/lib/action_cable/subscription_adapter/test.rb
index 52226a7c71..ce604cc88e 100644
--- a/actioncable/lib/action_cable/subscription_adapter/test.rb
+++ b/actioncable/lib/action_cable/subscription_adapter/test.rb
@@ -9,7 +9,7 @@ module ActionCable
# The test adapter should be used only in testing. Along with
# <tt>ActionCable::TestHelper</tt> it makes a great tool to test your Rails application.
#
- # To use the test adapter set adapter value to +test+ in your +cable.yml+.
+ # To use the test adapter set +adapter+ value to +test+ in your +config/cable.yml+ file.
#
# NOTE: Test adapter extends the <tt>ActionCable::SubscriptionsAdapter::Async</tt> adapter,
# so it could be used in system tests too.
diff --git a/actioncable/lib/action_cable/test_helper.rb b/actioncable/lib/action_cable/test_helper.rb
index dbd5ec3b16..7bc877663c 100644
--- a/actioncable/lib/action_cable/test_helper.rb
+++ b/actioncable/lib/action_cable/test_helper.rb
@@ -47,11 +47,12 @@ module ActionCable
original_count = broadcasts_size(stream)
yield
new_count = broadcasts_size(stream)
- assert_equal number, new_count - original_count, "#{number} broadcasts to #{stream} expected, but #{new_count - original_count} were sent"
+ actual_count = new_count - original_count
else
actual_count = broadcasts_size(stream)
- assert_equal number, actual_count, "#{number} broadcasts to #{stream} expected, but #{actual_count} were sent"
end
+
+ assert_equal number, actual_count, "#{number} broadcasts to #{stream} expected, but #{actual_count} were sent"
end
# Asserts that no messages have been sent to the stream.
@@ -125,7 +126,7 @@ module ActionCable
delegate :broadcasts, :clear_messages, to: :pubsub_adapter
private
- def broadcasts_size(channel) # :nodoc:
+ def broadcasts_size(channel)
broadcasts(channel).size
end
end