action-cable-testing 0.3.0 → 0.3.1

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
  SHA256:
3
- metadata.gz: f485ca6094981aea2459acc0a1334d79855b20180fd7866e4bbb073d97d9d75a
4
- data.tar.gz: a350c77463c57478ada51df21acdeab8a4ef4621abe7dad12a07347a3820c4f3
3
+ metadata.gz: 764d0e009091268cdcd8894568fd3a0228f3dae9cbfd77940209a9ffe1deb573
4
+ data.tar.gz: 6fadaa17e4e76c952c5e47e5dc6602cd4ec2b3bf2ce88df897ded52f3c5ed48e
5
5
  SHA512:
6
- metadata.gz: 166cd3cfd3481b90e4d67d3c1b2348010e399e762d5278e198de9d3b254babac01287ddfa288c0aa8c7ebd1402e538e2c34bc83a5ebda4214f3105c6288d84c5
7
- data.tar.gz: a3065fa172d0a0777dc057c68b17e5b12d1b89a4c105b9566b8a44cca3d37db713242982f9d1d9d465a5088b758fdf1b393bd0845f819dbeacac92109d1a8aa1
6
+ metadata.gz: fc7b8f670f821059a7c6fc8ea7eacf7360bfc3eab60cf0f7651c3d5b04b0406d77395b62b3c4dbe3b091c426cfd57292e998ee4c79672ae24fe372fb8485c597
7
+ data.tar.gz: 3dff7864524e0c04a22e608afb74548280957669f3c3d26d1411ae02f01204f2ce46061add68073c1f331d438b0a2a5740b0d6f37b2e94c1ae17286497451382
data/README.md CHANGED
@@ -173,11 +173,12 @@ module ApplicationCable
173
173
 
174
174
  # Asserts that the connection identifier is correct
175
175
  assert_equal "John", connection.user.name
176
- end
176
+ end
177
177
 
178
- def test_does_not_connect_without_user
179
- assert_reject_connection do
180
- connect
178
+ def test_does_not_connect_without_user
179
+ assert_reject_connection do
180
+ connect
181
+ end
181
182
  end
182
183
  end
183
184
  end
@@ -281,6 +282,8 @@ RSpec.describe ApplicationCable::Connection, type: :channel do
281
282
  end
282
283
  ```
283
284
 
285
+ **NOTE:** for connections testing you must use `type: :channel` too.
286
+
284
287
  #### Shared contexts to switch between adapters
285
288
 
286
289
  Sometimes you may want to use _real_ Action Cable adapter instead of the test one (for example, in Capybara-like tests).
@@ -336,10 +339,6 @@ rails generate test_unit:channel chat
336
339
  rails generate rspec:channel chat
337
340
  ```
338
341
 
339
- ## TODO
340
-
341
- - [Connection unit-testing](https://github.com/palkan/action-cable-testing/issues)
342
-
343
342
  ## Development
344
343
 
345
344
  After checking out the repo, run `bundle install` to install dependencies. Then, run `bundle exec rake` to run the tests.
@@ -55,7 +55,9 @@ module ActionCable
55
55
  attr_reader :logger, :request
56
56
 
57
57
  def initialize(path, cookies, headers)
58
- @logger = ActiveSupport::TaggedLogging.new ActiveSupport::Logger.new(StringIO.new)
58
+ inner_logger = ActiveSupport::Logger.new(StringIO.new)
59
+ tagged_logging = ActiveSupport::TaggedLogging.new(inner_logger)
60
+ @logger = ActionCable::Connection::TaggedLoggerProxy.new(tagged_logging, tags: [])
59
61
 
60
62
  uri = URI.parse(path)
61
63
  env = {
@@ -2,6 +2,6 @@
2
2
 
3
3
  module ActionCable
4
4
  module Testing
5
- VERSION = "0.3.0"
5
+ VERSION = "0.3.1"
6
6
  end
7
7
  end
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.3.0
4
+ version: 0.3.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: 2018-03-02 00:00:00.000000000 Z
11
+ date: 2018-04-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actioncable