action-cable-testing 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/action_cable/channel/test_case.rb +6 -2
- data/lib/action_cable/testing/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ee444fe922657c8eb469653a92b1e6283d11e5c6
|
4
|
+
data.tar.gz: 0bb6858c4b1d695ec8d7be341a25eb79c14b71e9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c1b6af262b55dc1104808a7d81e1d18ce3d3823824c48559f0ec1294099d8d20c92651b2f6ed5a0391638d04529a143b774d910630433304fcafb35584f8f4cd
|
7
|
+
data.tar.gz: 0a18ff1b692011d9f5880b9934f1c228f2c9aabd4fc6d58d3cd2137eb4de215d953212f3afe1492d10ba785ebf8989ae8a56c8270d5209ef882937829d9514be
|
data/CHANGELOG.md
CHANGED
@@ -191,9 +191,13 @@ module ActionCable
|
|
191
191
|
|
192
192
|
# Subsribe to the channel under test. Optionally pass subscription parameters as a Hash.
|
193
193
|
def subscribe(params = {})
|
194
|
-
|
194
|
+
# NOTE: Rails < 5.0.1 calls subscribe_to_channel during #initialize.
|
195
|
+
# We have to stub before it
|
196
|
+
@subscription = self.class.channel_class.allocate
|
195
197
|
@subscription.singleton_class.include(ChannelStub)
|
196
|
-
@subscription.
|
198
|
+
@subscription.send(:initialize, connection, CHANNEL_IDENTIFIER, params.with_indifferent_access)
|
199
|
+
# Call subscribe_to_channel if it's public (Rails 5.0.1+)
|
200
|
+
@subscription.subscribe_to_channel if ActionCable.gem_version >= Gem::Version.new("5.0.1")
|
197
201
|
@subscription
|
198
202
|
end
|
199
203
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: action-cable-testing
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vladimir Dementyev
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-11-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: actioncable
|