aboutsummaryrefslogtreecommitdiffstats
path: root/guides/source
diff options
context:
space:
mode:
authorbogdanvlviv <bogdanvlviv@gmail.com>2019-01-16 15:14:35 +0000
committerbogdanvlviv <bogdanvlviv@gmail.com>2019-01-16 15:14:35 +0000
commita43052cbbcb4f6671cf16fa45c906984fe601fa0 (patch)
treea1956541481fae746541cdd968181a4bf1c6287e /guides/source
parentd67863af390b45ed8dde551071a29b3d347bb8be (diff)
downloadrails-a43052cbbcb4f6671cf16fa45c906984fe601fa0.tar.gz
rails-a43052cbbcb4f6671cf16fa45c906984fe601fa0.tar.bz2
rails-a43052cbbcb4f6671cf16fa45c906984fe601fa0.zip
Remove `frozen_string_literal` from Action Cable's template files
Related to 837f602fa1b3281113dac965a8ef96de3cac8b02 Fix the testing guide.
Diffstat (limited to 'guides/source')
-rw-r--r--guides/source/testing.md10
1 files changed, 4 insertions, 6 deletions
diff --git a/guides/source/testing.md b/guides/source/testing.md
index 576c4d768c..1a2f480407 100644
--- a/guides/source/testing.md
+++ b/guides/source/testing.md
@@ -1735,14 +1735,14 @@ Testing Action Cable
--------------------
Since Action Cable is used at different levels inside your application,
-you'll need to test both the channels and connection classes themsleves and that other
+you'll need to test both the channels, connection classes themselves, and that other
entities broadcast correct messages.
### Connection Test Case
By default, when you generate new Rails application with Action Cable, a test for the base connection class (`ApplicationCable::Connection`) is generated as well under `test/channels/application_cable` directory.
-Connection tests aim to check whether a connection's identifiers gets assigned properly
+Connection tests aim to check whether a connection's identifiers get assigned properly
or that any improper connection requests are rejected. Here is an example:
```ruby
@@ -1765,9 +1765,8 @@ end
You can also specify request cookies the same way you do in integration tests:
-
```ruby
-test "connects with_cookies" do
+test "connects with cookies" do
cookies.signed[:user_id] = "42"
connect
@@ -1778,7 +1777,6 @@ end
See the API documentation for [`AcionCable::Connection::TestCase`](http://api.rubyonrails.org/classes/ActionCable/Connection/TestCase.html) for more information.
-
### Channel Test Case
By default, when you generate a channel, an associated test will be generated as well
@@ -1823,7 +1821,7 @@ See the API documentation for [`AcionCable::Channel::TestCase`](http://api.rubyo
Action Cable ships with a bunch of custom assertions that can be used to lessen the verbosity of tests. For a full list of available assertions, see the API documentation for [`ActionCable::TestHelper`](http://api.rubyonrails.org/classes/ActionCable/TestHelper.html).
-It's a good practice to ensure that the correct message has been broadcasted inside another components (e.g. inside your controllers). This is precisely where
+It's a good practice to ensure that the correct message has been broadcasted inside other components (e.g. inside your controllers). This is precisely where
the custom assertions provided by Action Cable are pretty useful. For instance,
within a model: