wisper-rspec 1.0.1 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/CHANGELOG.md +8 -1
- data/README.md +12 -2
- data/lib/wisper/rspec/matchers.rb +2 -0
- data/lib/wisper/rspec/version.rb +1 -1
- data/spec/wisper/rspec/matchers_spec.rb +9 -0
- metadata +2 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d3a4757d4ab7b0c3565660309b894a6033bd2117
|
4
|
+
data.tar.gz: 393331838cb5216f28690e760da75d29f73191c1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c8490dd30abb4a0cf4c6ae6b2736e42f7b0445e113ceb0b9289f976aedd71950d3e1ad35810892ba9685eb480e372ae920a58ea1c476979967553145b1dc1b1f
|
7
|
+
data.tar.gz: 3715c14f9fa2019da6f0fc8de7a0a773e51143c8fe01d7c9c35f6174db14f799300d325aff6c6a7fd13f08d534adf1d2042fe536a65708d1662fe98bc36116d2
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/CHANGELOG.md
CHANGED
@@ -1,10 +1,17 @@
|
|
1
1
|
Unreleased
|
2
2
|
|
3
|
+
1.1.0 (15/May/2018)
|
4
|
+
|
5
|
+
Authors: Nikolai (nikolai-b), David Kennedy (TheTeaNerd)
|
6
|
+
|
7
|
+
* Add not_broadcast matcher (https://github.com/krisleech/wisper-rspec/pull/30)
|
8
|
+
* Doc fixes
|
9
|
+
|
3
10
|
1.0.1 (24/Feb/2018)
|
4
11
|
|
5
12
|
Authors: Kris Leech, Konstantin Rudy (k-ruby)
|
6
13
|
|
7
|
-
* fixes: undefined method `id when using
|
14
|
+
* fixes: undefined method `id` when using LoggerBroadcaster [#22]
|
8
15
|
|
9
16
|
1.0.0 (16/Sept/2017)
|
10
17
|
|
data/README.md
CHANGED
@@ -62,10 +62,20 @@ expect {
|
|
62
62
|
|
63
63
|
Note that the `broadcast` method is aliased as `publish`, similar to the *Wisper* library itself.
|
64
64
|
|
65
|
-
###
|
65
|
+
### Not broadcast matcher
|
66
|
+
|
67
|
+
If you want to assert a broadcast was not made you can use `not_broadcast` which is especially useful when chaining expectations.
|
68
|
+
|
69
|
+
```ruby
|
70
|
+
expect {
|
71
|
+
publisher.execute(123)
|
72
|
+
}.to not_broadcast(:event, 99).and broadcast(:event, 123)
|
73
|
+
```
|
74
|
+
|
75
|
+
### Using message expectations
|
66
76
|
|
67
77
|
If you need to assert on the listener receiving broadcast arguments you can subscribe a double
|
68
|
-
with a [message
|
78
|
+
with a [message expectation](https://github.com/rspec/rspec-mocks#message-expectations)
|
69
79
|
and then use any of the [argument matchers](https://github.com/rspec/rspec-mocks#argument-matchers).
|
70
80
|
|
71
81
|
```ruby
|
data/lib/wisper/rspec/version.rb
CHANGED
@@ -4,6 +4,15 @@ RSpec::configure do |config|
|
|
4
4
|
config.include(Wisper::RSpec::BroadcastMatcher)
|
5
5
|
end
|
6
6
|
|
7
|
+
describe 'not_broadcast matcher' do
|
8
|
+
let(:publisher_class) { Class.new { include Wisper::Publisher } }
|
9
|
+
let(:publisher) { publisher_class.new }
|
10
|
+
|
11
|
+
it 'can be chained with broadcast' do
|
12
|
+
expect { publisher.send(:broadcast, :foobar) }.to not_broadcast(:barfoo).and broadcast(:foobar)
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
7
16
|
describe 'broadcast matcher' do
|
8
17
|
let(:publisher_class) { Class.new { include Wisper::Publisher } }
|
9
18
|
let(:publisher) { publisher_class.new }
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wisper-rspec
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kris Leech
|
@@ -30,7 +30,7 @@ cert_chain:
|
|
30
30
|
UktCshp/0fAPdyck9n64RkVTHYigKVbSGNJzpRW3CMD1EtRjr+cxS3nZ6zoelHo2
|
31
31
|
6qhxRqhaOjky82Aa9KJPpMfdfJMImA8JmzIyuw==
|
32
32
|
-----END CERTIFICATE-----
|
33
|
-
date: 2018-
|
33
|
+
date: 2018-05-15 00:00:00.000000000 Z
|
34
34
|
dependencies: []
|
35
35
|
description: Rspec matchers and stubbing for Wisper
|
36
36
|
email:
|
metadata.gz.sig
CHANGED
Binary file
|