rspec-sidekiq 4.0.0 → 4.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES.md +5 -0
- data/README.md +1 -5
- data/lib/rspec/sidekiq/matchers/base.rb +11 -12
- data/lib/rspec/sidekiq/matchers/have_enqueued_sidekiq_job.rb +2 -2
- data/lib/rspec/sidekiq/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e10d7ad26e39e70dba0ed0054c32d5edfdefd4788a06ca858c09d6a4aa90cd65
|
4
|
+
data.tar.gz: 050a61d6dd8720285462ff0ca3fe9d626a0f45f668f72d99d7f57d4788c77b29
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b7575bbe2397006c254cb61bce816460efc01dc7fb4434e371e3234796e4dbb12ab9e0bd9d9e769971979b060fb62852d2d54cdc1786b823f4a835467ebfcf6b
|
7
|
+
data.tar.gz: b2c3200a2f0dc3afd7b779564649e7c2a29b0d65a70c86d029704501ff4c9dc4180595a9520133a4568c3a956f4df713f5f382f2dd5e10f42c2095bd2b0208e6
|
data/CHANGES.md
CHANGED
@@ -1,3 +1,8 @@
|
|
1
|
+
4.0.1
|
2
|
+
---
|
3
|
+
* Restore the old normalizing expected args behavior with symbols (#205)
|
4
|
+
* fixes an unintentional breaking change in 4.0.0
|
5
|
+
|
1
6
|
4.0.0
|
2
7
|
---
|
3
8
|
* [BREAKING] Dropped support for matching jobs on ActiveJob's private API args, (e.g. `_aj_globalid` and `_aj_ruby2_keywords`). `_aj_globalid` can be replaced with the object itself, e.g. `have_enqueued_sidekiq_job(user)`.
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
**Welcome @wspurgin as new maintainer for `rspec-sidekiq`!**
|
2
2
|
|
3
|
-
[![
|
3
|
+
[![Gem Version](https://badge.fury.io/rb/rspec-sidekiq.svg)](https://badge.fury.io/rb/rspec-sidekiq)
|
4
4
|
[![Github Actions CI][github_actions_badge]][github_actions]
|
5
5
|
|
6
6
|
Simple testing of Sidekiq jobs via a collection of matchers and helpers.
|
@@ -341,11 +341,7 @@ Please do! If there's a feature missing that you'd love to see then get in on th
|
|
341
341
|
|
342
342
|
Issues/Pull Requests/Comments all welcome...
|
343
343
|
|
344
|
-
[gem_version_badge]: https://badge.fury.io/rb/rspec-sidekiq.svg
|
345
344
|
[github]: http://github.com/wspurgin/rspec-sidekiq
|
346
|
-
[ruby_doc]: http://rubydoc.info/gems/rspec-sidekiq/frames
|
347
|
-
[ruby_gems]: http://rubygems.org/gems/rspec-sidekiq
|
348
|
-
[ruby_toolbox]: http://www.ruby-toolbox.com/projects/rspec-sidekiq
|
349
345
|
[github_actions]: https://github.com/wspurgin/rspec-sidekiq/actions
|
350
346
|
[github_actions_badge]: https://github.com/wspurgin/rspec-sidekiq/actions/workflows/main.yml/badge.svg
|
351
347
|
|
@@ -171,7 +171,7 @@ module RSpec
|
|
171
171
|
end
|
172
172
|
|
173
173
|
def with(*expected_arguments)
|
174
|
-
@expected_arguments = expected_arguments
|
174
|
+
@expected_arguments = normalize_arguments(expected_arguments)
|
175
175
|
self
|
176
176
|
end
|
177
177
|
|
@@ -237,18 +237,17 @@ module RSpec
|
|
237
237
|
RSpec::Support::ObjectFormatter.format(thing)
|
238
238
|
end
|
239
239
|
|
240
|
-
def
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
when Symbol then arg.to_s
|
247
|
-
when Hash then JSON.parse(arg.to_json)
|
248
|
-
else
|
249
|
-
arg
|
250
|
-
end
|
240
|
+
def normalize_arguments(args)
|
241
|
+
if args.is_a?(Array)
|
242
|
+
args.map{ |x| normalize_arguments(x) }
|
243
|
+
elsif args.is_a?(Hash)
|
244
|
+
args.each_with_object({}) do |(key, value), hash|
|
245
|
+
hash[key.to_s] = normalize_arguments(value)
|
251
246
|
end
|
247
|
+
elsif args.is_a?(Symbol)
|
248
|
+
args.to_s
|
249
|
+
else
|
250
|
+
args
|
252
251
|
end
|
253
252
|
end
|
254
253
|
end
|
@@ -9,7 +9,7 @@ module RSpec
|
|
9
9
|
class HaveEnqueuedSidekiqJob < Base
|
10
10
|
def initialize(expected_arguments)
|
11
11
|
super()
|
12
|
-
@expected_arguments = expected_arguments
|
12
|
+
@expected_arguments = normalize_arguments(expected_arguments)
|
13
13
|
end
|
14
14
|
|
15
15
|
def matches?(job_class)
|
@@ -17,7 +17,7 @@ module RSpec
|
|
17
17
|
|
18
18
|
@actual_jobs = EnqueuedJobs.new(klass)
|
19
19
|
|
20
|
-
actual_jobs.includes?(
|
20
|
+
actual_jobs.includes?(expected_arguments, expected_options)
|
21
21
|
end
|
22
22
|
end
|
23
23
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rspec-sidekiq
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.0.
|
4
|
+
version: 4.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Aidan Coyle
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2023-08-
|
13
|
+
date: 2023-08-23 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rspec-core
|