resque_spec 0.13.0 → 0.14.0

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -26,9 +26,9 @@ Cucumber
26
26
 
27
27
  By default, the above will add the `ResqueSpec` module and make it available in
28
28
  Cucumber. If you want the `with_resque` and `without_resque` helpers, manually
29
- require the `resque\_spec/cucumber` module:
29
+ require the `resque_spec/cucumber` module:
30
30
 
31
- require 'resque\_spec/cucumber'
31
+ require 'resque_spec/cucumber'
32
32
 
33
33
  This can be done in `features/support/env.rb` or in a specific support file
34
34
  such as `features/support/resque.rb`.
@@ -66,7 +66,10 @@ And I write this spec using the `resque_spec` matcher
66
66
  end
67
67
  end
68
68
 
69
- (And I take note of the `before` block that is calling `reset!` for every spec)
69
+
70
+ And I see that the `have_queued` assertion is asserting that the `Person` queue has a job with arguments `person.id` and `:calculate`
71
+
72
+ And I take note of the `before` block that is calling `reset!` for every spec
70
73
 
71
74
  And I might use the `in` statement to specify the queue:
72
75
 
@@ -146,6 +149,28 @@ environment. Your initializer will probably end up looking like:
146
149
  # config/initializers/resque_mailer.rb
147
150
  Resque::Mailer.excluded_environments = []
148
151
 
152
+ If you have a mailer like this:
153
+
154
+ class ExampleMailer < ActionMailer::Base
155
+ include Resque::Mailer
156
+
157
+ def welcome_email(user_id)
158
+ end
159
+ end
160
+
161
+ You can write a spec like this:
162
+
163
+ describe "#welcome_email" do
164
+ before do
165
+ ResqueSpec.reset!
166
+ Examplemailer.welcome_email(user.id).deliver
167
+ end
168
+
169
+ subject { described_class }
170
+ it { should have_queue_size_of(1) }
171
+ it { should have_queued(:welcome_email, user.id) }
172
+ end
173
+
149
174
  resque-scheduler with Specs
150
175
  ==========================
151
176
 
@@ -358,30 +383,33 @@ Follow me on [Github](https://github.com/leshill) and
358
383
  Contributors
359
384
  ============
360
385
 
361
- * @kennethkalmer (Kenneth Kalmer) :rspec dependency fix
362
- * @bcardarella (Brian Cardarella) :fix mutation bug
363
- * @joshdavey (Joshua Davey) :with\_resque helper
364
- * @supaspoida (Lar Van Der Jagt) :with\_resque helper
365
- * @evansagge (Evan Sagge) :Hook in via Job.create, have\_queued.in
366
- * @l4rk (Jon Larkowski) :inline perform
367
- * @jcf (James Conroy-Finn) :spec fix
368
- * @ess (Dennis Walters) :enqueue\_in support
369
- * @RipTheJacker :remove\_delayed support
370
- * @kwerle (Kurt Werle) :explicit require spec for v020
371
- * @dwilkie :initial before\_enqueue support
372
- * @marcinb (Marcin Balinski) :have\_schedule\_size\_of matcher, schedule matcher at, in
373
- * @alexeits :fix matcher in bug with RSpec 2.8.0
374
- * @ToadJamb :encode/decode of Resque job arguments
375
- * @mkonikowski (Mateusz Konikowski) :support for anything matcher
376
- * @mathieuravaux (Mathieu Ravaux) :without\_resque\_spec support
377
- * @avdgaag (Arjan van der Gaag) :peek support
378
- * @dtsiknis :Updated removed\_delayed
379
- * @lellisga (Li Ellis Gallardo) :fix inline/disable\_ext bug
380
- * @jeffdeville (Jeff Deville) :Resque.size
381
- * @opinel (Frank Wambutt) :Fix DST problem in `have\_scheduled`
382
- * @lukemelia (Luke Melia) :Add `times` chained matcher
383
- * @heelhook (Pablo Fernandez) :Add `have_queue_size_of_at_least` and `have_schedule_size_of_at_least` matchers
384
- * @k1w1 :Add support for enqueue_at_with_queue/enqueue_in_with_queue
386
+ * Kenneth Kalmer (@kennethkalmer) : rspec dependency fix
387
+ * Brian Cardarella (@bcardarella) : fix mutation bug
388
+ * Joshua Davey (@joshdavey) : with\_resque helper
389
+ * Lar Van Der Jagt (@supaspoida) : with\_resque helper
390
+ * Evan Sagge (@evansagge) : Hook in via Job.create, have\_queued.in
391
+ * Jon Larkowski (@l4rk) : inline perform
392
+ * James Conroy-Finn (@jcf) : spec fix
393
+ * Dennis Walters (@ess) : enqueue\_in support
394
+ * (@RipTheJacker) : remove\_delayed support
395
+ * Kurt Werle (@kwerle) : explicit require spec for v020
396
+ * (@dwilkie) : initial before\_enqueue support
397
+ * Marcin Balinski (@marcinb) : have\_schedule\_size\_of matcher, schedule matcher at, in
398
+ * (@alexeits) : fix matcher in bug with RSpec 2.8.0
399
+ * (@ToadJamb) : encode/decode of Resque job arguments
400
+ * Mateusz Konikowski (@mkonikowski) : support for anything matcher
401
+ * Mathieu Ravaux (@mathieuravaux) : without\_resque\_spec support
402
+ * Arjan van der Gaag (@avdgaag) : peek support
403
+ * (@dtsiknis) : Updated removed\_delayed
404
+ * Li Ellis Gallardo (@lellisga) : fix inline/disable\_ext bug
405
+ * Jeff Deville (@jeffdeville) : Resque.size
406
+ * Frank Wambutt (@opinel) : Fix DST problem in `have\_scheduled`
407
+ * Luke Melia (@lukemelia) : Add `times` chained matcher
408
+ * Pablo Fernandez (@heelhook) : Add `have_queue_size_of_at_least` and `have_schedule_size_of_at_least` matchers
409
+ * (@k1w1) : Add support for enqueue_at_with_queue/enqueue_in_with_queue
410
+ * Ozéias Sant'ana (@ozeias) : Update specs to RSpec 2.10
411
+ * Yuya Kitajima (@yuyak) : Add ResqueMailer examples to README
412
+ * Andrés Bravo (@andresbravog) : Replace `rspec` dependency with explicit dependencies
385
413
 
386
414
  Copyright
387
415
  =========
@@ -1,4 +1,6 @@
1
- require 'rspec'
1
+ require 'rspec/core'
2
+ require 'rspec/expectations'
3
+ require 'rspec/mocks'
2
4
 
3
5
  module InQueueHelper
4
6
  def self.extended(klass)
@@ -1,3 +1,3 @@
1
1
  module ResqueSpec
2
- VERSION = "0.13.0"
2
+ VERSION = "0.14.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: resque_spec
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.13.0
4
+ version: 0.14.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-01-07 00:00:00.000000000 Z
12
+ date: 2013-08-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: resque
@@ -28,7 +28,39 @@ dependencies:
28
28
  - !ruby/object:Gem::Version
29
29
  version: 1.19.0
30
30
  - !ruby/object:Gem::Dependency
31
- name: rspec
31
+ name: rspec-core
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ! '>='
36
+ - !ruby/object:Gem::Version
37
+ version: 2.5.0
38
+ type: :runtime
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: 2.5.0
46
+ - !ruby/object:Gem::Dependency
47
+ name: rspec-expectations
48
+ requirement: !ruby/object:Gem::Requirement
49
+ none: false
50
+ requirements:
51
+ - - ! '>='
52
+ - !ruby/object:Gem::Version
53
+ version: 2.5.0
54
+ type: :runtime
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: 2.5.0
62
+ - !ruby/object:Gem::Dependency
63
+ name: rspec-mocks
32
64
  requirement: !ruby/object:Gem::Requirement
33
65
  none: false
34
66
  requirements:
@@ -107,6 +139,22 @@ dependencies:
107
139
  - - ! '>='
108
140
  - !ruby/object:Gem::Version
109
141
  version: '0'
142
+ - !ruby/object:Gem::Dependency
143
+ name: rspec
144
+ requirement: !ruby/object:Gem::Requirement
145
+ none: false
146
+ requirements:
147
+ - - ! '>='
148
+ - !ruby/object:Gem::Version
149
+ version: 2.10.0
150
+ type: :development
151
+ prerelease: false
152
+ version_requirements: !ruby/object:Gem::Requirement
153
+ none: false
154
+ requirements:
155
+ - - ! '>='
156
+ - !ruby/object:Gem::Version
157
+ version: 2.10.0
110
158
  description: RSpec matchers for Resque
111
159
  email: leshill@gmail.com
112
160
  executables: []
@@ -140,10 +188,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
140
188
  requirements:
141
189
  - - ! '>='
142
190
  - !ruby/object:Gem::Version
143
- version: 1.3.6
191
+ version: 2.0.0
144
192
  requirements: []
145
193
  rubyforge_project:
146
- rubygems_version: 1.8.24
194
+ rubygems_version: 1.8.23
147
195
  signing_key:
148
196
  specification_version: 3
149
197
  summary: RSpec matchers for Resque