gimme 0.3.2 → 0.3.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -6,5 +6,5 @@ rvm:
6
6
  - jruby-18mode # JRuby in 1.8 mode
7
7
  - jruby-19mode # JRuby in 1.9 mode
8
8
  - rbx-18mode
9
- # - rbx-19mode
9
+ # - rbx-19mode # see https://github.com/rubinius/rubinius/issues/1575
10
10
  - ree
data/Gemfile CHANGED
@@ -13,6 +13,7 @@ group :development, :test do
13
13
  gem "rspec-given"
14
14
  gem "cucumber"
15
15
  gem "simplecov", :require => false
16
+ gem 'jeweler'
16
17
 
17
18
  gem "guard-cucumber", :require => false
18
19
  gem "guard-rspec", :require => false
@@ -13,6 +13,7 @@ GEM
13
13
  ffi (1.0.11)
14
14
  gherkin (2.9.0)
15
15
  json (>= 1.4.6)
16
+ git (1.2.5)
16
17
  growl (1.0.3)
17
18
  guard (1.0.0)
18
19
  ffi (>= 0.5.0)
@@ -22,6 +23,11 @@ GEM
22
23
  guard (>= 0.8.3)
23
24
  guard-rspec (0.6.0)
24
25
  guard (>= 0.10.0)
26
+ jeweler (1.8.3)
27
+ bundler (~> 1.0)
28
+ git (>= 1.2.5)
29
+ rake
30
+ rdoc
25
31
  json (1.6.5)
26
32
  method_source (0.7.0)
27
33
  multi_json (1.1.0)
@@ -59,6 +65,7 @@ DEPENDENCIES
59
65
  growl
60
66
  guard-cucumber
61
67
  guard-rspec
68
+ jeweler
62
69
  pry
63
70
  rake
64
71
  rb-fsevent
@@ -98,6 +98,7 @@ You can also specify how many times a specific invocation should have occurred (
98
98
  double.equal?(:fruit)
99
99
 
100
100
  verify(double,2).equal?(:fruit)
101
+ verify(double,2.times).equal?(:fruit) # N.times syntax needs ruby >= 1.8.7
101
102
 
102
103
  ### Using Argument Matchers
103
104
 
@@ -127,7 +128,7 @@ Other matchers:
127
128
  * **boolean** — matches true or false arguments
128
129
  * **numeric** — matches numeric arguments
129
130
 
130
- See the [cucumber feature for examples using these matchers](http://relishapp.com/searls/gimme/stubbing-with-matchers)
131
+ See the [cucumber feature for examples using these matchers](https://www.relishapp.com/searls/gimme/docs/old/stubbing-with-matchers)
131
132
 
132
133
  #### Writing Custom Argument Matchers
133
134
 
@@ -234,4 +235,4 @@ This way we can clearly specify the SUT's interaction with the Marker class whil
234
235
  ## About
235
236
 
236
237
  ### Maintainers
237
- * [Justin Searls](http://about.emw/searls), [test double](http://test-double.com)
238
+ * [Justin Searls](http://about.me/searls), [test double](http://test-double.com)
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.2
1
+ 0.3.3
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "gimme"
8
- s.version = "0.3.2"
8
+ s.version = "0.3.3"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Justin Searls"]
12
- s.date = "2012-03-31"
12
+ s.date = "2012-05-07"
13
13
  s.description = "gimme attempts to bring to Ruby a test double workflow akin to Mockito in Java. Major distinctions include preserving arrange-act-assert in tests, fast feedback for methods the double's real counterpart may not know how to respond to, no string/symbolic representations of methods, argument captors, and strong opinions (weakly held). "
14
14
  s.email = "searls@gmail.com"
15
15
  s.extra_rdoc_files = [
@@ -86,8 +86,8 @@ Gem::Specification.new do |s|
86
86
  s.homepage = "http://github.com/searls/gimme"
87
87
  s.licenses = ["MIT"]
88
88
  s.require_paths = ["lib"]
89
- s.rubygems_version = "1.8.10"
90
- s.summary = "gimme \342\200\224\302\240a low-specification test double library for Ruby"
89
+ s.rubygems_version = "1.8.24"
90
+ s.summary = "gimme \u{2014}\u{a0}a low-specification test double library for Ruby"
91
91
 
92
92
  if s.respond_to? :specification_version then
93
93
  s.specification_version = 3
@@ -100,6 +100,7 @@ Gem::Specification.new do |s|
100
100
  s.add_development_dependency(%q<rspec-given>, [">= 0"])
101
101
  s.add_development_dependency(%q<cucumber>, [">= 0"])
102
102
  s.add_development_dependency(%q<simplecov>, [">= 0"])
103
+ s.add_development_dependency(%q<jeweler>, [">= 0"])
103
104
  s.add_development_dependency(%q<guard-cucumber>, [">= 0"])
104
105
  s.add_development_dependency(%q<guard-rspec>, [">= 0"])
105
106
  s.add_development_dependency(%q<growl>, [">= 0"])
@@ -114,6 +115,7 @@ Gem::Specification.new do |s|
114
115
  s.add_dependency(%q<rspec-given>, [">= 0"])
115
116
  s.add_dependency(%q<cucumber>, [">= 0"])
116
117
  s.add_dependency(%q<simplecov>, [">= 0"])
118
+ s.add_dependency(%q<jeweler>, [">= 0"])
117
119
  s.add_dependency(%q<guard-cucumber>, [">= 0"])
118
120
  s.add_dependency(%q<guard-rspec>, [">= 0"])
119
121
  s.add_dependency(%q<growl>, [">= 0"])
@@ -129,6 +131,7 @@ Gem::Specification.new do |s|
129
131
  s.add_dependency(%q<rspec-given>, [">= 0"])
130
132
  s.add_dependency(%q<cucumber>, [">= 0"])
131
133
  s.add_dependency(%q<simplecov>, [">= 0"])
134
+ s.add_dependency(%q<jeweler>, [">= 0"])
132
135
  s.add_dependency(%q<guard-cucumber>, [">= 0"])
133
136
  s.add_dependency(%q<guard-rspec>, [">= 0"])
134
137
  s.add_dependency(%q<growl>, [">= 0"])
@@ -4,7 +4,7 @@ module Gimme
4
4
  attr_accessor :raises_no_method_error
5
5
  def initialize(double,times=1)
6
6
  @double = double
7
- @times = times
7
+ @times = times.respond_to?(:count) ? times.count : times
8
8
  @raises_no_method_error = true
9
9
  end
10
10
 
@@ -7,6 +7,13 @@ module Gimme
7
7
  Then { result.should_not raise_error }
8
8
  end
9
9
 
10
+ context "using the N.times syntax for invocation count" do
11
+ Given { 2.times { test_double.ferment } }
12
+ Given(:verifier) { verifier_class.new(test_double, 2.times) }
13
+ When(:result) { lambda { 2.times { verifier.ferment } } }
14
+ Then { result.should_not raise_error }
15
+ end
16
+
10
17
  context "never invoked" do
11
18
  When(:result) { lambda { verifier.ferment } }
12
19
  Then { result.should raise_error Errors::VerificationFailedError }
@@ -88,4 +95,4 @@ module Gimme
88
95
  Then { result.should raise_error Errors::VerificationFailedError }
89
96
  end
90
97
  end
91
- end
98
+ end
metadata CHANGED
@@ -1,219 +1,253 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: gimme
3
- version: !ruby/object:Gem::Version
4
- hash: 23
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.3.3
5
5
  prerelease:
6
- segments:
7
- - 0
8
- - 3
9
- - 2
10
- version: 0.3.2
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - Justin Searls
14
9
  autorequire:
15
10
  bindir: bin
16
11
  cert_chain: []
17
-
18
- date: 2012-03-31 00:00:00 Z
19
- dependencies:
20
- - !ruby/object:Gem::Dependency
21
- version_requirements: &id001 !ruby/object:Gem::Requirement
22
- none: false
23
- requirements:
24
- - - ">="
25
- - !ruby/object:Gem::Version
26
- hash: 3
27
- segments:
28
- - 0
29
- version: "0"
30
- requirement: *id001
31
- prerelease: false
12
+ date: 2012-05-07 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
32
15
  name: pry
33
- type: :development
34
- - !ruby/object:Gem::Dependency
35
- version_requirements: &id002 !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
36
17
  none: false
37
- requirements:
38
- - - ">="
39
- - !ruby/object:Gem::Version
40
- hash: 3
41
- segments:
42
- - 0
43
- version: "0"
44
- requirement: *id002
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
22
+ type: :development
45
23
  prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: '0'
30
+ - !ruby/object:Gem::Dependency
46
31
  name: rdoc
47
- type: :development
48
- - !ruby/object:Gem::Dependency
49
- version_requirements: &id003 !ruby/object:Gem::Requirement
32
+ requirement: !ruby/object:Gem::Requirement
50
33
  none: false
51
- requirements:
52
- - - ">="
53
- - !ruby/object:Gem::Version
54
- hash: 3
55
- segments:
56
- - 0
57
- version: "0"
58
- requirement: *id003
34
+ requirements:
35
+ - - ! '>='
36
+ - !ruby/object:Gem::Version
37
+ version: '0'
38
+ type: :development
59
39
  prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: '0'
46
+ - !ruby/object:Gem::Dependency
60
47
  name: rake
61
- type: :development
62
- - !ruby/object:Gem::Dependency
63
- version_requirements: &id004 !ruby/object:Gem::Requirement
48
+ requirement: !ruby/object:Gem::Requirement
64
49
  none: false
65
- requirements:
66
- - - ">="
67
- - !ruby/object:Gem::Version
68
- hash: 3
69
- segments:
70
- - 0
71
- version: "0"
72
- requirement: *id004
50
+ requirements:
51
+ - - ! '>='
52
+ - !ruby/object:Gem::Version
53
+ version: '0'
54
+ type: :development
73
55
  prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ - !ruby/object:Gem::Dependency
74
63
  name: rspec
75
- type: :development
76
- - !ruby/object:Gem::Dependency
77
- version_requirements: &id005 !ruby/object:Gem::Requirement
64
+ requirement: !ruby/object:Gem::Requirement
78
65
  none: false
79
- requirements:
80
- - - ">="
81
- - !ruby/object:Gem::Version
82
- hash: 3
83
- segments:
84
- - 0
85
- version: "0"
86
- requirement: *id005
66
+ requirements:
67
+ - - ! '>='
68
+ - !ruby/object:Gem::Version
69
+ version: '0'
70
+ type: :development
87
71
  prerelease: false
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ! '>='
76
+ - !ruby/object:Gem::Version
77
+ version: '0'
78
+ - !ruby/object:Gem::Dependency
88
79
  name: rspec-given
89
- type: :development
90
- - !ruby/object:Gem::Dependency
91
- version_requirements: &id006 !ruby/object:Gem::Requirement
80
+ requirement: !ruby/object:Gem::Requirement
92
81
  none: false
93
- requirements:
94
- - - ">="
95
- - !ruby/object:Gem::Version
96
- hash: 3
97
- segments:
98
- - 0
99
- version: "0"
100
- requirement: *id006
82
+ requirements:
83
+ - - ! '>='
84
+ - !ruby/object:Gem::Version
85
+ version: '0'
86
+ type: :development
101
87
  prerelease: false
88
+ version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
90
+ requirements:
91
+ - - ! '>='
92
+ - !ruby/object:Gem::Version
93
+ version: '0'
94
+ - !ruby/object:Gem::Dependency
102
95
  name: cucumber
103
- type: :development
104
- - !ruby/object:Gem::Dependency
105
- version_requirements: &id007 !ruby/object:Gem::Requirement
96
+ requirement: !ruby/object:Gem::Requirement
106
97
  none: false
107
- requirements:
108
- - - ">="
109
- - !ruby/object:Gem::Version
110
- hash: 3
111
- segments:
112
- - 0
113
- version: "0"
114
- requirement: *id007
98
+ requirements:
99
+ - - ! '>='
100
+ - !ruby/object:Gem::Version
101
+ version: '0'
102
+ type: :development
115
103
  prerelease: false
104
+ version_requirements: !ruby/object:Gem::Requirement
105
+ none: false
106
+ requirements:
107
+ - - ! '>='
108
+ - !ruby/object:Gem::Version
109
+ version: '0'
110
+ - !ruby/object:Gem::Dependency
116
111
  name: simplecov
112
+ requirement: !ruby/object:Gem::Requirement
113
+ none: false
114
+ requirements:
115
+ - - ! '>='
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
117
118
  type: :development
118
- - !ruby/object:Gem::Dependency
119
- version_requirements: &id008 !ruby/object:Gem::Requirement
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
120
121
  none: false
121
- requirements:
122
- - - ">="
123
- - !ruby/object:Gem::Version
124
- hash: 3
125
- segments:
126
- - 0
127
- version: "0"
128
- requirement: *id008
122
+ requirements:
123
+ - - ! '>='
124
+ - !ruby/object:Gem::Version
125
+ version: '0'
126
+ - !ruby/object:Gem::Dependency
127
+ name: jeweler
128
+ requirement: !ruby/object:Gem::Requirement
129
+ none: false
130
+ requirements:
131
+ - - ! '>='
132
+ - !ruby/object:Gem::Version
133
+ version: '0'
134
+ type: :development
129
135
  prerelease: false
136
+ version_requirements: !ruby/object:Gem::Requirement
137
+ none: false
138
+ requirements:
139
+ - - ! '>='
140
+ - !ruby/object:Gem::Version
141
+ version: '0'
142
+ - !ruby/object:Gem::Dependency
130
143
  name: guard-cucumber
131
- type: :development
132
- - !ruby/object:Gem::Dependency
133
- version_requirements: &id009 !ruby/object:Gem::Requirement
144
+ requirement: !ruby/object:Gem::Requirement
134
145
  none: false
135
- requirements:
136
- - - ">="
137
- - !ruby/object:Gem::Version
138
- hash: 3
139
- segments:
140
- - 0
141
- version: "0"
142
- requirement: *id009
146
+ requirements:
147
+ - - ! '>='
148
+ - !ruby/object:Gem::Version
149
+ version: '0'
150
+ type: :development
143
151
  prerelease: false
152
+ version_requirements: !ruby/object:Gem::Requirement
153
+ none: false
154
+ requirements:
155
+ - - ! '>='
156
+ - !ruby/object:Gem::Version
157
+ version: '0'
158
+ - !ruby/object:Gem::Dependency
144
159
  name: guard-rspec
145
- type: :development
146
- - !ruby/object:Gem::Dependency
147
- version_requirements: &id010 !ruby/object:Gem::Requirement
160
+ requirement: !ruby/object:Gem::Requirement
148
161
  none: false
149
- requirements:
150
- - - ">="
151
- - !ruby/object:Gem::Version
152
- hash: 3
153
- segments:
154
- - 0
155
- version: "0"
156
- requirement: *id010
162
+ requirements:
163
+ - - ! '>='
164
+ - !ruby/object:Gem::Version
165
+ version: '0'
166
+ type: :development
157
167
  prerelease: false
168
+ version_requirements: !ruby/object:Gem::Requirement
169
+ none: false
170
+ requirements:
171
+ - - ! '>='
172
+ - !ruby/object:Gem::Version
173
+ version: '0'
174
+ - !ruby/object:Gem::Dependency
158
175
  name: growl
159
- type: :development
160
- - !ruby/object:Gem::Dependency
161
- version_requirements: &id011 !ruby/object:Gem::Requirement
176
+ requirement: !ruby/object:Gem::Requirement
162
177
  none: false
163
- requirements:
164
- - - ">="
165
- - !ruby/object:Gem::Version
166
- hash: 3
167
- segments:
168
- - 0
169
- version: "0"
170
- requirement: *id011
178
+ requirements:
179
+ - - ! '>='
180
+ - !ruby/object:Gem::Version
181
+ version: '0'
182
+ type: :development
171
183
  prerelease: false
184
+ version_requirements: !ruby/object:Gem::Requirement
185
+ none: false
186
+ requirements:
187
+ - - ! '>='
188
+ - !ruby/object:Gem::Version
189
+ version: '0'
190
+ - !ruby/object:Gem::Dependency
172
191
  name: rb-fsevent
173
- type: :development
174
- - !ruby/object:Gem::Dependency
175
- version_requirements: &id012 !ruby/object:Gem::Requirement
192
+ requirement: !ruby/object:Gem::Requirement
176
193
  none: false
177
- requirements:
178
- - - ">="
179
- - !ruby/object:Gem::Version
180
- hash: 25
181
- segments:
182
- - 1
183
- - 3
184
- - 1
185
- version: 1.3.1
186
- requirement: *id012
194
+ requirements:
195
+ - - ! '>='
196
+ - !ruby/object:Gem::Version
197
+ version: '0'
198
+ type: :development
187
199
  prerelease: false
200
+ version_requirements: !ruby/object:Gem::Requirement
201
+ none: false
202
+ requirements:
203
+ - - ! '>='
204
+ - !ruby/object:Gem::Version
205
+ version: '0'
206
+ - !ruby/object:Gem::Dependency
188
207
  name: rspec
189
- type: :development
190
- - !ruby/object:Gem::Dependency
191
- version_requirements: &id013 !ruby/object:Gem::Requirement
208
+ requirement: !ruby/object:Gem::Requirement
192
209
  none: false
193
- requirements:
194
- - - ">="
195
- - !ruby/object:Gem::Version
196
- hash: 55
197
- segments:
198
- - 0
199
- - 10
200
- - 0
201
- version: 0.10.0
202
- requirement: *id013
210
+ requirements:
211
+ - - ! '>='
212
+ - !ruby/object:Gem::Version
213
+ version: 1.3.1
214
+ type: :development
203
215
  prerelease: false
216
+ version_requirements: !ruby/object:Gem::Requirement
217
+ none: false
218
+ requirements:
219
+ - - ! '>='
220
+ - !ruby/object:Gem::Version
221
+ version: 1.3.1
222
+ - !ruby/object:Gem::Dependency
204
223
  name: cucumber
224
+ requirement: !ruby/object:Gem::Requirement
225
+ none: false
226
+ requirements:
227
+ - - ! '>='
228
+ - !ruby/object:Gem::Version
229
+ version: 0.10.0
205
230
  type: :development
206
- description: "gimme attempts to bring to Ruby a test double workflow akin to Mockito in Java. Major distinctions include preserving arrange-act-assert in tests, fast feedback for methods the double's real counterpart may not know how to respond to, no string/symbolic representations of methods, argument captors, and strong opinions (weakly held). "
231
+ prerelease: false
232
+ version_requirements: !ruby/object:Gem::Requirement
233
+ none: false
234
+ requirements:
235
+ - - ! '>='
236
+ - !ruby/object:Gem::Version
237
+ version: 0.10.0
238
+ description: ! 'gimme attempts to bring to Ruby a test double workflow akin to Mockito
239
+ in Java. Major distinctions include preserving arrange-act-assert in tests, fast
240
+ feedback for methods the double''s real counterpart may not know how to respond
241
+ to, no string/symbolic representations of methods, argument captors, and strong
242
+ opinions (weakly held). '
207
243
  email: searls@gmail.com
208
244
  executables: []
209
-
210
245
  extensions: []
211
-
212
- extra_rdoc_files:
246
+ extra_rdoc_files:
213
247
  - LICENSE.txt
214
248
  - README.markdown
215
249
  - README.rdoc
216
- files:
250
+ files:
217
251
  - .document
218
252
  - .travis.yml
219
253
  - Gemfile
@@ -279,37 +313,31 @@ files:
279
313
  - spec/gimme/verifies_spec.rb
280
314
  - spec/spec_helper.rb
281
315
  homepage: http://github.com/searls/gimme
282
- licenses:
316
+ licenses:
283
317
  - MIT
284
318
  post_install_message:
285
319
  rdoc_options: []
286
-
287
- require_paths:
320
+ require_paths:
288
321
  - lib
289
- required_ruby_version: !ruby/object:Gem::Requirement
322
+ required_ruby_version: !ruby/object:Gem::Requirement
290
323
  none: false
291
- requirements:
292
- - - ">="
293
- - !ruby/object:Gem::Version
294
- hash: 3
295
- segments:
324
+ requirements:
325
+ - - ! '>='
326
+ - !ruby/object:Gem::Version
327
+ version: '0'
328
+ segments:
296
329
  - 0
297
- version: "0"
298
- required_rubygems_version: !ruby/object:Gem::Requirement
330
+ hash: 2557097271096030919
331
+ required_rubygems_version: !ruby/object:Gem::Requirement
299
332
  none: false
300
- requirements:
301
- - - ">="
302
- - !ruby/object:Gem::Version
303
- hash: 3
304
- segments:
305
- - 0
306
- version: "0"
333
+ requirements:
334
+ - - ! '>='
335
+ - !ruby/object:Gem::Version
336
+ version: '0'
307
337
  requirements: []
308
-
309
338
  rubyforge_project:
310
- rubygems_version: 1.8.10
339
+ rubygems_version: 1.8.24
311
340
  signing_key:
312
341
  specification_version: 3
313
- summary: "gimme \xE2\x80\x94\xC2\xA0a low-specification test double library for Ruby"
342
+ summary: gimme — a low-specification test double library for Ruby
314
343
  test_files: []
315
-