beanstalk-client-rspec 0.0.5 → 0.0.6

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.6 (2012-09-23)
2
+
3
+ Features
4
+ --------
5
+
6
+ * Add have\_tube\_size\_of\_gt
7
+
1
8
  # 0.0.5 (2012-06-26)
2
9
 
3
10
  Bugfixes
@@ -18,4 +18,6 @@ Gem::Specification.new do |gem|
18
18
 
19
19
  gem.add_dependency('rspec')
20
20
  gem.add_dependency('beanstalk-client')
21
+
22
+ gem.add_development_dependency('rake')
21
23
  end
@@ -47,3 +47,22 @@ RSpec::Matchers.define :have_tube_size_of do |size|
47
47
  end
48
48
  end
49
49
 
50
+ RSpec::Matchers.define :have_tube_size_of_gt do |size|
51
+ extend TubeHelper
52
+ match do |actual|
53
+ tube_size(actual) > size
54
+ end
55
+
56
+ failure_message_for_should do |actual|
57
+ "expected that tube #{actual} would have greater than #{size} jobs, but got #{tube_size(actual)} jobs instead"
58
+ end
59
+
60
+ failure_message_for_should_not do |actual|
61
+ "expected that tube #{actual} would not have greater than #{size} jobs, but got #{tube_size(actual)} jobs instead"
62
+ end
63
+
64
+ description do
65
+ "have greater than #{size} jobs in tube"
66
+ end
67
+ end
68
+
@@ -1,7 +1,7 @@
1
1
  module Beanstalk
2
2
  module Client
3
3
  module Rspec
4
- VERSION = '0.0.5'
4
+ VERSION = '0.0.6'
5
5
  end
6
6
  end
7
7
  end
data/spec/rspec_spec.rb CHANGED
@@ -14,4 +14,12 @@ describe 'RSpec' do
14
14
  @beanstalk.yput :foo => 'bar'
15
15
  @beanstalk.should have_tube_size_of(1).for('oath')
16
16
  end
17
+
18
+ it 'should match gt queue size' do
19
+ @beanstalk.use 'oath'
20
+ @beanstalk.yput :foo => 'bar'
21
+ @beanstalk.yput :foo => 'bar'
22
+ @beanstalk.yput :foo => 'bar'
23
+ @beanstalk.should have_tube_size_of_gt(2).for('oath')
24
+ end
17
25
  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.5
4
+ version: 0.0.6
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: 2012-06-26 00:00:00.000000000 Z
12
+ date: 2012-09-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec
@@ -43,6 +43,22 @@ dependencies:
43
43
  - - ! '>='
44
44
  - !ruby/object:Gem::Version
45
45
  version: '0'
46
+ - !ruby/object:Gem::Dependency
47
+ name: rake
48
+ requirement: !ruby/object:Gem::Requirement
49
+ none: false
50
+ requirements:
51
+ - - ! '>='
52
+ - !ruby/object:Gem::Version
53
+ version: '0'
54
+ type: :development
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
46
62
  description: Provides a fairly complete mock for beanstalk-client by imitating beanstalkd
47
63
  using arrays. Also provides some rspec matchers for testing the state of the system.
48
64
  email:
@@ -79,12 +95,18 @@ required_ruby_version: !ruby/object:Gem::Requirement
79
95
  - - ! '>='
80
96
  - !ruby/object:Gem::Version
81
97
  version: '0'
98
+ segments:
99
+ - 0
100
+ hash: 750356280578376697
82
101
  required_rubygems_version: !ruby/object:Gem::Requirement
83
102
  none: false
84
103
  requirements:
85
104
  - - ! '>='
86
105
  - !ruby/object:Gem::Version
87
106
  version: '0'
107
+ segments:
108
+ - 0
109
+ hash: 750356280578376697
88
110
  requirements: []
89
111
  rubyforge_project:
90
112
  rubygems_version: 1.8.23
@@ -92,4 +114,3 @@ signing_key:
92
114
  specification_version: 3
93
115
  summary: Mock and RSpec for beanstalk-client
94
116
  test_files: []
95
- has_rdoc: