aboutsummaryrefslogtreecommitdiffstats
path: root/actioncable
diff options
context:
space:
mode:
Diffstat (limited to 'actioncable')
-rw-r--r--actioncable/CHANGELOG.md5
-rw-r--r--actioncable/README.md6
-rw-r--r--actioncable/test/channel/base_test.rb28
3 files changed, 18 insertions, 21 deletions
diff --git a/actioncable/CHANGELOG.md b/actioncable/CHANGELOG.md
index 64aea88588..22126d82b7 100644
--- a/actioncable/CHANGELOG.md
+++ b/actioncable/CHANGELOG.md
@@ -1,8 +1,5 @@
## Rails 5.0.0.beta1 (December 18, 2015) ##
-* No changes.
-
-
* Added to Rails!
- *DHH* \ No newline at end of file
+ *DHH*
diff --git a/actioncable/README.md b/actioncable/README.md
index 823964343a..32f49c215f 100644
--- a/actioncable/README.md
+++ b/actioncable/README.md
@@ -16,7 +16,7 @@ WebSockets open to your application if they use multiple browser tabs or devices
The client of a WebSocket connection is called the consumer.
Each consumer can in turn subscribe to multiple cable channels. Each channel encapsulates
-a logical unit of work, similar to what a controller does in a regular MVC setup. For example,
+a logical unit of work, similar to what a controller does in a regular MVC setup. For example,
you could have a `ChatChannel` and a `AppearancesChannel`, and a consumer could be subscribed to either
or to both of these channels. At the very least, a consumer should be subscribed to one channel.
@@ -91,7 +91,7 @@ The client-side needs to setup a consumer instance of this connection. That's do
#= require action_cable
@App = {}
-App.cable = Cable.createConsumer("ws://cable.example.com")
+App.cable = ActionCable.createConsumer("ws://cable.example.com")
```
The ws://cable.example.com address must point to your set of Action Cable servers, and it
@@ -395,7 +395,7 @@ bundle exec puma -p 28080 cable/config.ru
```
The above will start a cable server on port 28080. Remember to point your client-side setup against that using something like:
-`App.cable = Cable.createConsumer("ws://basecamp.dev:28080")`.
+`App.cable = ActionCable.createConsumer("ws://basecamp.dev:28080")`.
### In app
diff --git a/actioncable/test/channel/base_test.rb b/actioncable/test/channel/base_test.rb
index b8b3c6a139..d41bf3064b 100644
--- a/actioncable/test/channel/base_test.rb
+++ b/actioncable/test/channel/base_test.rb
@@ -166,19 +166,19 @@ class ActionCable::Channel::BaseTest < ActiveSupport::TestCase
end
end
- def assert_logged(message)
- old_logger = @connection.logger
- log = StringIO.new
- @connection.instance_variable_set(:@logger, Logger.new(log))
-
- begin
- yield
-
- log.rewind
- assert_match message, log.read
- ensure
- @connection.instance_variable_set(:@logger, old_logger)
+ private
+ def assert_logged(message)
+ old_logger = @connection.logger
+ log = StringIO.new
+ @connection.instance_variable_set(:@logger, Logger.new(log))
+
+ begin
+ yield
+
+ log.rewind
+ assert_match message, log.read
+ ensure
+ @connection.instance_variable_set(:@logger, old_logger)
+ end
end
- end
-
end