action-cable-testing 0.0.7 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 96625e06dd39e7a58e78f77601bdc84d440cad8a
4
- data.tar.gz: e125b688d9c10e7ad1ed89efeb25bc8c2e7f225b
3
+ metadata.gz: ccc828bc776db7a157df36234b2ff0d6c7071464
4
+ data.tar.gz: ff68ff540546c5a70fcafa6a63287f28829544a1
5
5
  SHA512:
6
- metadata.gz: 17592526b34d09527d340b414dd0d9664a11fab820fd5d8aa49f5f67ea55c5494cb0044f83d6555d23d6ed745603923e808015b544cc797c6018dc0eb5289f57
7
- data.tar.gz: e9c91223b1702d725293ff5e7303e2c2d6bc39a8b90f550ff1d37a98bedd19367c55dd414d8b2a9eced77e922de03e74d792ec441dd9f418b322682f3ff0085a
6
+ metadata.gz: 00db28832cc067f02a0f98a3651e5d3a20a28aa394802bdd1d5bee2645f573cc9e7d0aa79b8466ad708b3480b3462949f380e2dc5dafdfb1c22a82524956a969
7
+ data.tar.gz: 39e3ad0bbe0f6a54b3c06177c78924cbc023f5fba35ef39bf933e835a1880b7b13e17dfb000e14e7886c6aaa64f715d5ef27c4471a6b25ef1c1b1d8f21716a29
data/README.md CHANGED
@@ -124,8 +124,15 @@ end
124
124
 
125
125
  ### RSpec Usage
126
126
 
127
+ First, you need to have [rspec-rails](https://github.com/rspec/rspec-rails) installed.
127
128
 
128
- First, set your adapter to `test` in `cable.yml`:
129
+ Second, add this to your `"rails_helper.rb"` after requiring `environment.rb`:
130
+
131
+ ```ruby
132
+ require "action_cable/testing/rspec"
133
+ ```
134
+
135
+ To use `have_broadcasted_to` / `broadcast_to` matchers anywhere in your specs, set your adapter to `test` in `cable.yml`:
129
136
 
130
137
  ```yml
131
138
  # config/cable.yml
@@ -133,7 +140,8 @@ test:
133
140
  adapter: test
134
141
  ```
135
142
 
136
- Now you can use `have_broadcasted_to` / `broadcast_to` matchers anywhere in your specs. For example:
143
+ And then use these matchers, for example:
144
+
137
145
 
138
146
  ```ruby
139
147
  RSpec.describe CommentsController do
@@ -186,6 +194,10 @@ rails generate test_unit:channel chat
186
194
  rails generate rspec:channel chat
187
195
  ```
188
196
 
197
+ ## TODO
198
+
199
+ - [Connection unit-testing](https://github.com/palkan/action-cable-testing/issues)
200
+
189
201
  ## Development
190
202
 
191
203
  After checking out the repo, run `bundle install` to install dependencies. Then, run `bundle exec rake` to run the tests.
@@ -18,5 +18,3 @@ module ActionCable
18
18
  autoload :Test
19
19
  end
20
20
  end
21
-
22
- require "action_cable/testing/rspec" if defined?(::RSpec::Rails)
@@ -1,5 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require "action-cable-testing"
4
+ require "rspec/rails"
3
5
  require "rspec/rails/example/channel_example_group"
4
6
  require "rspec/rails/matchers/action_cable"
5
7
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module ActionCable
4
4
  module Testing
5
- VERSION = "0.0.7"
5
+ VERSION = "0.1.0"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: action-cable-testing
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vladimir Dementyev