beanstalk-client-rspec 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.mkd CHANGED
@@ -1,3 +1,10 @@
1
+ # 0.0.4 (2012-02-19)
2
+
3
+ Bugfixes
4
+ --------
5
+
6
+ * Reserve on empty queue was raising an exception instead of TimedOut
7
+
1
8
  # 0.0.3 (2012-02-09)
2
9
 
3
10
  Bugfixes
@@ -1,7 +1,7 @@
1
1
  module Beanstalk
2
2
  module Client
3
3
  module Rspec
4
- VERSION = "0.0.3"
4
+ VERSION = "0.0.4"
5
5
  end
6
6
  end
7
7
  end
@@ -26,6 +26,9 @@ module Beanstalk
26
26
  job = nil
27
27
  @watch_list.each do |tube_name|
28
28
  begin
29
+ if @tubes[tube_name].nil?
30
+ next
31
+ end
29
32
  job = @tubes[tube_name]['ready'].pop(false)
30
33
  rescue ThreadError
31
34
  next
@@ -49,7 +52,7 @@ module Beanstalk
49
52
  private
50
53
  def interact(cmd, rfmt)
51
54
  case cmd
52
- when /^watch/
55
+ when /^watch (\S+)/
53
56
  [@watch_list.size]
54
57
  when /^ignore/
55
58
  [@watch_list.size]
@@ -59,4 +59,12 @@ describe Beanstalk::MockPool do
59
59
  end
60
60
  end
61
61
 
62
+ describe 'beanstalk workflow' do
63
+ it 'can reserve an empty tube' do
64
+ expect {
65
+ @beanstalk.reserve
66
+ }.to raise_error Beanstalk::TimedOut
67
+ end
68
+ end
69
+
62
70
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: beanstalk-client-rspec
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-02-09 00:00:00.000000000 Z
12
+ date: 2012-02-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec
16
- requirement: &20900600 !ruby/object:Gem::Requirement
16
+ requirement: &28719040 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *20900600
24
+ version_requirements: *28719040
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: beanstalk-client
27
- requirement: &20899760 !ruby/object:Gem::Requirement
27
+ requirement: &28717920 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,7 +32,7 @@ dependencies:
32
32
  version: '0'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *20899760
35
+ version_requirements: *28717920
36
36
  description: Provides a fairly complete mock for beanstalk-client by imitating beanstalkd
37
37
  using arrays. Also provides some rspec matchers for testing the state of the system.
38
38
  email: