rspec-activejob 0.6.0 → 0.6.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
  SHA1:
3
- metadata.gz: 9d09b4563475ff8556cae29a398448b78a3da4c7
4
- data.tar.gz: 678218734197d92b674770b9a9fd91988e58c865
3
+ metadata.gz: 9c85f07d8fed679d6ba98c874138dc4aa94dab7c
4
+ data.tar.gz: 2500787016954f418afc77fbb58181df4f7bfd44
5
5
  SHA512:
6
- metadata.gz: 2f14e3e32d634747c09cc672f0eae2dfcf78c6fcd0f5af6e6fe39ff6426f62ad41b0a833c607042e9b97c8e957b672c56bf5c03c8c61ec18e8d55004d6b835d2
7
- data.tar.gz: d0240dc8b98a58f4cfbdf13da957c5b37d51052ba27112fd67d55f6b618e55490715f7664da4a304e8b32007b1ccd3038fcce4649e7c3b520bb117394908a784
6
+ metadata.gz: ec5ecf3f8a5cef9ebf37363a7785640dbb919a5b4496bcc07db6cbaf27a5912c5de4ebfcf44164bd9ccecd7bef2255b2c79c5345d2f463be4c76239de8fd2e21
7
+ data.tar.gz: 4158e055e60c79150681b3de6a941645a5640a6b6e8f1772ca37729050b5ac7c4daa3cead4f54fe1441f651e97fdbdb6c11ebb36c5aeb4d10b26562cc634719c
@@ -1,3 +1,8 @@
1
+ ## 0.6.1 - October 20, 2015
2
+
3
+ - Make `once` and `times(n)` modifiers play nicely with other jobs being enqueued - patch
4
+ by [@basawyer](https://github.com/basawyer)
5
+
1
6
  ## 0.6.0 - October 15, 2015
2
7
 
3
8
  - Add `once` and `times(n)` modifiers - patch by [@antstorm](https://github.com/antstorm)
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rspec-activejob (0.6.0)
4
+ rspec-activejob (0.6.1)
5
5
  activejob (>= 4.2)
6
6
  rspec-mocks
7
7
 
@@ -166,7 +166,7 @@ module RSpec
166
166
  def enqueued_correct_number_of_times?
167
167
  return true unless number_of_times
168
168
 
169
- new_jobs.count == number_of_times
169
+ new_jobs_with_correct_class.count == number_of_times
170
170
  end
171
171
  end
172
172
  end
@@ -1,5 +1,5 @@
1
1
  module RSpec
2
2
  module ActiveJob
3
- VERSION = '0.6.0'.freeze
3
+ VERSION = '0.6.1'.freeze
4
4
  end
5
5
  end
@@ -192,9 +192,17 @@ RSpec.describe RSpec::ActiveJob::Matchers::EnqueueA do
192
192
  subject(:matches?) { instance.once.matches?(AJob) }
193
193
 
194
194
  context "correct number of times" do
195
- let(:enqueued_jobs) { [{ job: AJob, args: [] }] }
195
+ context "as the only job" do
196
+ let(:enqueued_jobs) { [{ job: AJob, args: [] }] }
196
197
 
197
- it { is_expected.to be(true) }
198
+ it { is_expected.to be(true) }
199
+ end
200
+
201
+ context "with other jobs" do
202
+ let(:enqueued_jobs) { [{ job: AJob, args: [] }, { job: BJob, args: [] }] }
203
+
204
+ it { is_expected.to be(true) }
205
+ end
198
206
  end
199
207
 
200
208
  context "wrong number of times" do
@@ -216,11 +224,19 @@ RSpec.describe RSpec::ActiveJob::Matchers::EnqueueA do
216
224
  subject(:matches?) { instance.times(2).matches?(AJob) }
217
225
 
218
226
  context "correct number of times" do
219
- let(:enqueued_jobs) do
220
- [{ job: AJob, args: [] }, { job: AJob, args: [] }]
227
+ context "as the only job" do
228
+ let(:enqueued_jobs) { [{ job: AJob, args: [] }, { job: AJob, args: [] }] }
229
+
230
+ it { is_expected.to be(true) }
221
231
  end
222
232
 
223
- it { is_expected.to be(true) }
233
+ context "with other jobs" do
234
+ let(:enqueued_jobs) do
235
+ [{ job: AJob, args: [] }, { job: AJob, args: [] }, { job: BJob, args: [] }]
236
+ end
237
+
238
+ it { is_expected.to be(true) }
239
+ end
224
240
  end
225
241
 
226
242
  context "wrong number of times" do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rspec-activejob
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Isaac Seymour
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-10-15 00:00:00.000000000 Z
11
+ date: 2015-10-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activejob