karafka-testing 2.0.0.alpha2 → 2.0.0.alpha3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/CHANGELOG.md +3 -0
- data/Gemfile.lock +3 -4
- data/README.md +19 -1
- data/lib/karafka/testing/rspec/helpers.rb +1 -0
- data/lib/karafka/testing/version.rb +1 -1
- data.tar.gz.sig +0 -0
- metadata +3 -3
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3769d261f8182c715897978e8209e8f4bc91f24f43bd2731144a50ae96d6de3a
|
4
|
+
data.tar.gz: fbed816843740c85f3c506f665fa3ceaee493d6e0455a59e28c46adda64ee183
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 82006d2f8bc92018774fd99db5e9bdef1106eb4840e8f49d0ebade8cda05eede39ed6f523d3254f6154564b4a2bf0eb15421d1cbd3270f223d836e94b21c145d
|
7
|
+
data.tar.gz: 897ce9acfdff42145a5fceec9adeef5c4027707f2b2f3e894eb006a7a8a2424daa60a10e727bd18c2678d051d8ac8e2ad54d101b0b7b94e5a1dfcc7d44cb3873
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
karafka-testing (2.0.0.
|
4
|
+
karafka-testing (2.0.0.alpha3)
|
5
5
|
karafka (~> 2.0.alpha2)
|
6
6
|
|
7
7
|
GEM
|
@@ -56,7 +56,7 @@ GEM
|
|
56
56
|
thor (>= 0.20)
|
57
57
|
waterdrop (>= 2.2.0, < 3.0.0)
|
58
58
|
zeitwerk (~> 2.3)
|
59
|
-
mini_portile2 (2.
|
59
|
+
mini_portile2 (2.8.0)
|
60
60
|
rake (13.0.6)
|
61
61
|
rdkafka (0.11.1)
|
62
62
|
ffi (~> 1.15)
|
@@ -73,11 +73,10 @@ GEM
|
|
73
73
|
zeitwerk (2.5.4)
|
74
74
|
|
75
75
|
PLATFORMS
|
76
|
-
x86_64-darwin
|
77
76
|
x86_64-linux
|
78
77
|
|
79
78
|
DEPENDENCIES
|
80
79
|
karafka-testing!
|
81
80
|
|
82
81
|
BUNDLED WITH
|
83
|
-
2.3.
|
82
|
+
2.3.7
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Karafka Testing library
|
2
2
|
|
3
|
-
**Note**: Documentation presented below works with Karafka `2.0.0.
|
3
|
+
**Note**: Documentation presented below works with Karafka `2.0.0.alpha3` and higher.
|
4
4
|
|
5
5
|
Please refer to [this](https://github.com/karafka/testing/tree/1.4) branch and its documentation for details about usage with Karafka `1.4`.
|
6
6
|
|
@@ -63,6 +63,24 @@ RSpec.describe InlineBatchConsumer do
|
|
63
63
|
end
|
64
64
|
```
|
65
65
|
|
66
|
+
If your consumers use `producer` to dispatch messages, you can set up your expectations against it as well:
|
67
|
+
|
68
|
+
```ruby
|
69
|
+
RSpec.describe InlineBatchConsumer do
|
70
|
+
subject(:consumer) { karafka.consumer_for(:inline_batch_data) }
|
71
|
+
|
72
|
+
before { karafka.publish({ 'number' => 1 }.to_json) }
|
73
|
+
|
74
|
+
it 'expects to dispatch async message to messages topic with value bigger by 1' do
|
75
|
+
expect(consumer.producer)
|
76
|
+
.to receive(:produce_async)
|
77
|
+
.with(topic: 'messages', payload: { number: 2 }.to_json)
|
78
|
+
|
79
|
+
consumer.consume
|
80
|
+
end
|
81
|
+
end
|
82
|
+
```
|
83
|
+
|
66
84
|
## Note on contributions
|
67
85
|
|
68
86
|
First, thank you for considering contributing to the Karafka ecosystem! It's people like you that make the open source community such a great community!
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: karafka-testing
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.0.
|
4
|
+
version: 2.0.0.alpha3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Maciej Mensfeld
|
@@ -34,7 +34,7 @@ cert_chain:
|
|
34
34
|
R2P11bWoCtr70BsccVrN8jEhzwXngMyI2gVt750Y+dbTu1KgRqZKp/ECe7ZzPzXj
|
35
35
|
pIy9vHxTANKYVyI4qj8OrFdEM5BQNu8oQpL0iQ==
|
36
36
|
-----END CERTIFICATE-----
|
37
|
-
date: 2022-
|
37
|
+
date: 2022-03-14 00:00:00.000000000 Z
|
38
38
|
dependencies:
|
39
39
|
- !ruby/object:Gem::Dependency
|
40
40
|
name: karafka
|
@@ -100,7 +100,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
100
100
|
- !ruby/object:Gem::Version
|
101
101
|
version: 1.3.1
|
102
102
|
requirements: []
|
103
|
-
rubygems_version: 3.3.
|
103
|
+
rubygems_version: 3.3.4
|
104
104
|
signing_key:
|
105
105
|
specification_version: 4
|
106
106
|
summary: Library which provides helpers for easier Karafka consumers tests
|
metadata.gz.sig
CHANGED
Binary file
|