rspec-be_valid_when_matcher 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +8 -4
- data/lib/rspec/be_valid_when_matcher.rb +148 -20
- data/spec/examples.cache +97 -97
- data/spec/spec_helper.rb +6 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4ecb1390a1f1dd5222d60871c22e883974a42650
|
4
|
+
data.tar.gz: 8ca1889bf00f7410e351ac352375e660f9b4e3c4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8bb28772fea0c5e1e3169cd4b6abbc927b3d07834e471e953ddae10b845887d57d5f4bdbda697a229794b0bbe6d8151e776efaa11894c3861b9408bd8ad0ed6c
|
7
|
+
data.tar.gz: 9c862a67333aeb3234ffe1bf8685fb768953afa343759dfb47b6dcf853591cee62a5711a1a29d30877931b4336044e5e8da96753aee81b7c7a2feb314a0e0d3a
|
data/README.md
CHANGED
@@ -1,9 +1,13 @@
|
|
1
1
|
# rspec-be_valid_when_matcher
|
2
2
|
|
3
|
-
[![Gem Version](https://badge.fury.io/rb/rspec-be_valid_when_matcher.svg)]
|
4
|
-
|
5
|
-
[![Build Status](https://travis-ci.org/mtuchowski/rspec-be_valid_when_matcher.svg)]
|
6
|
-
|
3
|
+
[![Gem Version](https://badge.fury.io/rb/rspec-be_valid_when_matcher.svg)](
|
4
|
+
http://badge.fury.io/rb/rspec-be_valid_when_matcher)
|
5
|
+
[![Build Status](https://travis-ci.org/mtuchowski/rspec-be_valid_when_matcher.svg)](
|
6
|
+
https://travis-ci.org/mtuchowski/rspec-be_valid_when_matcher)
|
7
|
+
[![Code Climate](https://codeclimate.com/github/mtuchowski/rspec-be_valid_when_matcher/badges/gpa.svg)](
|
8
|
+
https://codeclimate.com/github/mtuchowski/rspec-be_valid_when_matcher)
|
9
|
+
[![Test Coverage](https://codeclimate.com/github/mtuchowski/rspec-be_valid_when_matcher/badges/coverage.svg)](
|
10
|
+
https://codeclimate.com/github/mtuchowski/rspec-be_valid_when_matcher/coverage)
|
7
11
|
|
8
12
|
RSpec matcher for testing ActiveRecord models with a fluent and clear language.
|
9
13
|
|
@@ -6,8 +6,6 @@ require 'bigdecimal'
|
|
6
6
|
module RSpec
|
7
7
|
# Container module for be_valid_when matcher definition and implementation.
|
8
8
|
module BeValidWhenMatcher
|
9
|
-
# rubocop:disable Style/PredicateName
|
10
|
-
|
11
9
|
# Provides the implementation for `be_valid_when` matcher.
|
12
10
|
# Not intended to be instantiated directly.
|
13
11
|
# @api private
|
@@ -32,7 +30,6 @@ module RSpec
|
|
32
30
|
# {http://api.rubyonrails.org/classes/ActiveModel/Validations.html#method-i-errors `errors`}
|
33
31
|
# on specified `field` after setting it's `value` and validating it. Does not take into
|
34
32
|
# account other fields and the validity of the whole object.
|
35
|
-
# @api private
|
36
33
|
# @param model [Object] an Object implementing `ActiveModel::Validations`.
|
37
34
|
# @return [Boolean] `true` if there are no errors on `field`, `false` otherwise.
|
38
35
|
def matches?(model)
|
@@ -46,7 +43,6 @@ module RSpec
|
|
46
43
|
# {http://api.rubyonrails.org/classes/ActiveModel/Validations.html#method-i-errors `errors`}
|
47
44
|
# on specified `field` after setting it's `value` and validating it. Does not take into
|
48
45
|
# account other fields.
|
49
|
-
# @api private
|
50
46
|
# @param model [Object] an Object implementing `ActiveModel::Validations`.
|
51
47
|
# @return [Boolean] `true` if there are errors on `field`, `false` otherwise.
|
52
48
|
def does_not_match?(model)
|
@@ -55,7 +51,6 @@ module RSpec
|
|
55
51
|
end
|
56
52
|
|
57
53
|
# Called when {#matches?} returns false.
|
58
|
-
# @api private
|
59
54
|
# @return [String] explaining what was expected.
|
60
55
|
def failure_message
|
61
56
|
assert_value_existence
|
@@ -65,7 +60,6 @@ module RSpec
|
|
65
60
|
end
|
66
61
|
|
67
62
|
# Called when {#does_not_match?} returns false.
|
68
|
-
# @api private
|
69
63
|
# @return [String] explaining what was expected.
|
70
64
|
def failure_message_when_negated
|
71
65
|
assert_value_existence
|
@@ -75,7 +69,6 @@ module RSpec
|
|
75
69
|
end
|
76
70
|
|
77
71
|
# Used to generate the example's doc string in one-liner syntax.
|
78
|
-
# @api private
|
79
72
|
# @return [String] short description of what is expected.
|
80
73
|
def description
|
81
74
|
assert_value_existence
|
@@ -84,29 +77,18 @@ module RSpec
|
|
84
77
|
end
|
85
78
|
|
86
79
|
# Indicates that this matcher doesn't provide actual and expected attributes.
|
87
|
-
# @api private
|
88
80
|
# @return [FalseClass]
|
89
81
|
def diffable?
|
90
82
|
false
|
91
83
|
end
|
92
84
|
|
93
85
|
# Indicates that this matcher cannot be used in a block expectation expression.
|
94
|
-
# @api private
|
95
86
|
# @return [FalseClass]
|
96
87
|
def supports_block_expectations?
|
97
88
|
false
|
98
89
|
end
|
99
90
|
|
100
|
-
#
|
101
|
-
# @overload is(value)
|
102
|
-
# Sets the field `value`.
|
103
|
-
# @param value [Any] field `value` to use in matching.
|
104
|
-
# @overload is(value, message)
|
105
|
-
# Sets the field `value` and custom failure `message`.
|
106
|
-
# @param value [Any] field `value` to use in matching.
|
107
|
-
# @param message [String] a `message` used for {#failure_message},
|
108
|
-
# {#failure_message_when_negated} and {#description}.
|
109
|
-
# @return [self]
|
91
|
+
# @see BeValidWhenMatcher#is
|
110
92
|
def is(*args)
|
111
93
|
number_of_arguments = args.size
|
112
94
|
|
@@ -120,7 +102,8 @@ module RSpec
|
|
120
102
|
self
|
121
103
|
end
|
122
104
|
|
123
|
-
#
|
105
|
+
# rubocop:disable Style/PredicateName
|
106
|
+
# @see BeValidWhenMatcher#is_not_present
|
124
107
|
def is_not_present
|
125
108
|
is(nil, 'not present')
|
126
109
|
end
|
@@ -187,6 +170,22 @@ module RSpec
|
|
187
170
|
end
|
188
171
|
|
189
172
|
# Model validity assertion.
|
173
|
+
#
|
174
|
+
# @overload be_valid_when(field)
|
175
|
+
# @param field (Symbol) field name to use.
|
176
|
+
#
|
177
|
+
# @overload be_valid_when(field, value)
|
178
|
+
# @param field (Symbol) field name to use.
|
179
|
+
# @param value (Any) field `value` to use in matching.
|
180
|
+
#
|
181
|
+
# @overload be_valid_when(field, value, message)
|
182
|
+
# @param field (Symbol) field name to use.
|
183
|
+
# @param value (Any) field `value` to use in matching.
|
184
|
+
# @param message [String] a `message` used for failure message.
|
185
|
+
#
|
186
|
+
# @raise [ArgumentError] if field name is not a symbol.
|
187
|
+
# @raise [ArgumentError] if invoked with more than three parameters.
|
188
|
+
# @return [self]
|
190
189
|
def be_valid_when(*args)
|
191
190
|
number_of_arguments = args.size
|
192
191
|
field_name = args.shift
|
@@ -197,5 +196,134 @@ module RSpec
|
|
197
196
|
BeValidWhen.new(field_name).is(*args)
|
198
197
|
end
|
199
198
|
end
|
199
|
+
|
200
|
+
# @!group Basic chaining
|
201
|
+
|
202
|
+
# @!method is(*args)
|
203
|
+
# Used to set field `value` and optional custom failure `message`.
|
204
|
+
#
|
205
|
+
# @overload is(value)
|
206
|
+
# Sets the field `value`.
|
207
|
+
# @param value [Any] field `value` to use in matching.
|
208
|
+
# @example
|
209
|
+
# it { is_expected.to be_valid_when(:field).is(true) }
|
210
|
+
#
|
211
|
+
# @overload is(value, message)
|
212
|
+
# Sets the field `value` and custom failure `message`.
|
213
|
+
# @param value [Any] field `value` to use in matching.
|
214
|
+
# @param message [String] a `message` used for failure message.
|
215
|
+
# @example
|
216
|
+
# it { is_expected.to be_valid_when(:field).is(42, 'magic number') }
|
217
|
+
#
|
218
|
+
# @raise [ArgumentError] if invoked without passing `value` parameter.
|
219
|
+
# @raise [ArgumentError] if invoked with more than two parameters.
|
220
|
+
# @return [self]
|
221
|
+
|
222
|
+
# @!endgroup
|
223
|
+
|
224
|
+
# @!group Presence
|
225
|
+
|
226
|
+
# @!method is_not_present()
|
227
|
+
# Used to setup matcher for checking `nil` value.
|
228
|
+
# @example
|
229
|
+
# it { is_expected.to be_valid_when(:field).is_not_present }
|
230
|
+
# @return [self]
|
231
|
+
|
232
|
+
# @!endgroup
|
233
|
+
|
234
|
+
# @!group Type
|
235
|
+
|
236
|
+
# @!method is_numeric(value = 42)
|
237
|
+
# Setup matcher for checking numeric values.
|
238
|
+
# @raise [ArgumentError] if given non `Numeric` value.
|
239
|
+
# @example
|
240
|
+
# it { is_expected.to be_valid_when(:field).is_numeric }
|
241
|
+
# @return [self]
|
242
|
+
|
243
|
+
# @!method is_integer(value = 42)
|
244
|
+
# Setup matcher for checking integer values.
|
245
|
+
# @raise [ArgumentError] if given non `Integer` value.
|
246
|
+
# @example
|
247
|
+
# it { is_expected.to be_valid_when(:field).is_integer }
|
248
|
+
# @return [self]
|
249
|
+
|
250
|
+
# @!method is_fixnum(value = 42)
|
251
|
+
# Setup matcher for checking fixnum values.
|
252
|
+
# @raise [ArgumentError] if given non `Fixnum` value.
|
253
|
+
# @example
|
254
|
+
# it { is_expected.to be_valid_when(:field).is_fixnum }
|
255
|
+
# @return [self]
|
256
|
+
|
257
|
+
# @!method is_bignum(value = 42**13)
|
258
|
+
# Setup matcher for checking bignum values.
|
259
|
+
# @raise [ArgumentError] if given non `Bignum` value.
|
260
|
+
# @example
|
261
|
+
# it { is_expected.to be_valid_when(:field).is_bignum }
|
262
|
+
# @return [self]
|
263
|
+
|
264
|
+
# @!method is_float(value = 3.14)
|
265
|
+
# Setup matcher for checking float values.
|
266
|
+
# @raise [ArgumentError] if given non `Float` value.
|
267
|
+
# @example
|
268
|
+
# it { is_expected.to be_valid_when(:field).is_float }
|
269
|
+
# @return [self]
|
270
|
+
|
271
|
+
# @!method is_complex(value = 42+0i)
|
272
|
+
# Setup matcher for checking complex values.
|
273
|
+
# @raise [ArgumentError] if given non `Complex` value.
|
274
|
+
# @example
|
275
|
+
# it { is_expected.to be_valid_when(:field).is_complex }
|
276
|
+
# @return [self]
|
277
|
+
|
278
|
+
# @!method is_rational(value = 42/1)
|
279
|
+
# Setup matcher for checking rational values.
|
280
|
+
# @raise [ArgumentError] if given non `Rational` value.
|
281
|
+
# @example
|
282
|
+
# it { is_expected.to be_valid_when(:field).is_rational }
|
283
|
+
# @return [self]
|
284
|
+
|
285
|
+
# @!method is_bigdecimal(value = 0.42E2)
|
286
|
+
# Setup matcher for checking bigdecimal values.
|
287
|
+
# @raise [ArgumentError] if given non `BigDecimal` value.
|
288
|
+
# @example
|
289
|
+
# it { is_expected.to be_valid_when(:field).is_bigdecimal }
|
290
|
+
# @return [self]
|
291
|
+
|
292
|
+
# @!method is_string(value = 'value')
|
293
|
+
# Setup matcher for checking string values.
|
294
|
+
# @raise [ArgumentError] if given non `String` value.
|
295
|
+
# @example
|
296
|
+
# it { is_expected.to be_valid_when(:field).is_string }
|
297
|
+
# @return [self]
|
298
|
+
|
299
|
+
# @!method is_regexp(value = /^value$/)
|
300
|
+
# Setup matcher for checking regexp values.
|
301
|
+
# @raise [ArgumentError] if given non `Regexp` value.
|
302
|
+
# @example
|
303
|
+
# it { is_expected.to be_valid_when(:field).is_regexp }
|
304
|
+
# @return [self]
|
305
|
+
|
306
|
+
# @!method is_array(value = [42])
|
307
|
+
# Setup matcher for checking array values.
|
308
|
+
# @raise [ArgumentError] if given non `Array` value.
|
309
|
+
# @example
|
310
|
+
# it { is_expected.to be_valid_when(:field).is_array }
|
311
|
+
# @return [self]
|
312
|
+
|
313
|
+
# @!method is_hash(value = { value: 42 })
|
314
|
+
# Setup matcher for checking hash values.
|
315
|
+
# @raise [ArgumentError] if given non `Hash` value.
|
316
|
+
# @example
|
317
|
+
# it { is_expected.to be_valid_when(:field).is_hash }
|
318
|
+
# @return [self]
|
319
|
+
|
320
|
+
# @!method is_symbol(value = :value)
|
321
|
+
# Setup matcher for checking symbol values.
|
322
|
+
# @raise [ArgumentError] if given non `Symbol` value.
|
323
|
+
# @example
|
324
|
+
# it { is_expected.to be_valid_when(:field).is_symbol }
|
325
|
+
# @return [self]
|
326
|
+
|
327
|
+
# @!endgroup
|
200
328
|
end
|
201
329
|
end
|
data/spec/examples.cache
CHANGED
@@ -1,110 +1,110 @@
|
|
1
1
|
example_id | status | run_time |
|
2
2
|
------------------------------------------------------ | ------ | --------------- |
|
3
|
-
./spec/rspec/be_valid_when/is_not_present_spec.rb[1:1] | passed | 0.
|
4
|
-
./spec/rspec/be_valid_when/is_not_present_spec.rb[1:2] | passed | 0.
|
5
|
-
./spec/rspec/be_valid_when/is_not_present_spec.rb[1:3] | passed | 0.
|
6
|
-
./spec/rspec/be_valid_when/is_spec.rb[1:1] | passed | 0.
|
7
|
-
./spec/rspec/be_valid_when/is_spec.rb[1:2:1] | passed | 0.
|
8
|
-
./spec/rspec/be_valid_when/is_spec.rb[1:3:1] | passed | 0.
|
9
|
-
./spec/rspec/be_valid_when/is_spec.rb[1:3:2] | passed | 0.
|
10
|
-
./spec/rspec/be_valid_when/is_spec.rb[1:4] | passed | 0.
|
11
|
-
./spec/rspec/be_valid_when/is_type_spec.rb[1:
|
12
|
-
./spec/rspec/be_valid_when/is_type_spec.rb[1:
|
13
|
-
./spec/rspec/be_valid_when/is_type_spec.rb[1:
|
3
|
+
./spec/rspec/be_valid_when/is_not_present_spec.rb[1:1] | passed | 0.01317 seconds |
|
4
|
+
./spec/rspec/be_valid_when/is_not_present_spec.rb[1:2] | passed | 0.00033 seconds |
|
5
|
+
./spec/rspec/be_valid_when/is_not_present_spec.rb[1:3] | passed | 0.00069 seconds |
|
6
|
+
./spec/rspec/be_valid_when/is_spec.rb[1:1] | passed | 0.0001 seconds |
|
7
|
+
./spec/rspec/be_valid_when/is_spec.rb[1:2:1] | passed | 0.00277 seconds |
|
8
|
+
./spec/rspec/be_valid_when/is_spec.rb[1:3:1] | passed | 0.00267 seconds |
|
9
|
+
./spec/rspec/be_valid_when/is_spec.rb[1:3:2] | passed | 0.00087 seconds |
|
10
|
+
./spec/rspec/be_valid_when/is_spec.rb[1:4] | passed | 0.00008 seconds |
|
11
|
+
./spec/rspec/be_valid_when/is_type_spec.rb[1:1:1:1] | passed | 0.05099 seconds |
|
12
|
+
./spec/rspec/be_valid_when/is_type_spec.rb[1:1:1:2] | passed | 0.00076 seconds |
|
13
|
+
./spec/rspec/be_valid_when/is_type_spec.rb[1:1:2:1] | passed | 0.01303 seconds |
|
14
|
+
./spec/rspec/be_valid_when/is_type_spec.rb[1:1:2:2] | passed | 0.00015 seconds |
|
15
|
+
./spec/rspec/be_valid_when/is_type_spec.rb[1:1:2:3] | passed | 0.00115 seconds |
|
16
|
+
./spec/rspec/be_valid_when/is_type_spec.rb[1:2:1:1] | passed | 0.0119 seconds |
|
17
|
+
./spec/rspec/be_valid_when/is_type_spec.rb[1:2:1:2] | passed | 0.00013 seconds |
|
18
|
+
./spec/rspec/be_valid_when/is_type_spec.rb[1:2:2:1] | passed | 0.01126 seconds |
|
14
19
|
./spec/rspec/be_valid_when/is_type_spec.rb[1:2:2:2] | passed | 0.00013 seconds |
|
15
|
-
./spec/rspec/be_valid_when/is_type_spec.rb[1:2:2:3] | passed | 0.
|
16
|
-
./spec/rspec/be_valid_when/is_type_spec.rb[1:3:1:1] | passed | 0.
|
17
|
-
./spec/rspec/be_valid_when/is_type_spec.rb[1:3:1:2] | passed | 0.
|
18
|
-
./spec/rspec/be_valid_when/is_type_spec.rb[1:3:2:1] | passed | 0.
|
19
|
-
./spec/rspec/be_valid_when/is_type_spec.rb[1:3:2:2] | passed | 0.
|
20
|
-
./spec/rspec/be_valid_when/is_type_spec.rb[1:3:2:3] | passed | 0.
|
21
|
-
./spec/rspec/be_valid_when/is_type_spec.rb[1:4:1:1] | passed | 0.
|
22
|
-
./spec/rspec/be_valid_when/is_type_spec.rb[1:4:1:2] | passed | 0.
|
23
|
-
./spec/rspec/be_valid_when/is_type_spec.rb[1:4:2:1] | passed | 0.
|
24
|
-
./spec/rspec/be_valid_when/is_type_spec.rb[1:4:2:2] | passed | 0.
|
25
|
-
./spec/rspec/be_valid_when/is_type_spec.rb[1:4:2:3] | passed | 0.
|
26
|
-
./spec/rspec/be_valid_when/is_type_spec.rb[1:5:1:1] | passed | 0.
|
27
|
-
./spec/rspec/be_valid_when/is_type_spec.rb[1:5:1:2] | passed | 0.
|
28
|
-
./spec/rspec/be_valid_when/is_type_spec.rb[1:5:2:1] | passed | 0.
|
29
|
-
./spec/rspec/be_valid_when/is_type_spec.rb[1:5:2:2] | passed | 0.
|
30
|
-
./spec/rspec/be_valid_when/is_type_spec.rb[1:5:2:3] | passed | 0.
|
31
|
-
./spec/rspec/be_valid_when/is_type_spec.rb[1:6:1:1] | passed | 0.
|
32
|
-
./spec/rspec/be_valid_when/is_type_spec.rb[1:6:1:2] | passed | 0.
|
33
|
-
./spec/rspec/be_valid_when/is_type_spec.rb[1:6:2:1] | passed | 0.
|
34
|
-
./spec/rspec/be_valid_when/is_type_spec.rb[1:6:2:2] | passed | 0.
|
35
|
-
./spec/rspec/be_valid_when/is_type_spec.rb[1:6:2:3] | passed | 0.
|
36
|
-
./spec/rspec/be_valid_when/is_type_spec.rb[1:7:1:1] | passed | 0.
|
37
|
-
./spec/rspec/be_valid_when/is_type_spec.rb[1:7:1:2] | passed | 0.
|
38
|
-
./spec/rspec/be_valid_when/is_type_spec.rb[1:7:2:1] | passed | 0.
|
39
|
-
./spec/rspec/be_valid_when/is_type_spec.rb[1:7:2:2] | passed | 0.
|
40
|
-
./spec/rspec/be_valid_when/is_type_spec.rb[1:7:2:3] | passed | 0.
|
41
|
-
./spec/rspec/be_valid_when/is_type_spec.rb[1:8:1:1] | passed | 0.
|
42
|
-
./spec/rspec/be_valid_when/is_type_spec.rb[1:8:1:2] | passed | 0.
|
43
|
-
./spec/rspec/be_valid_when/is_type_spec.rb[1:8:2:1] | passed | 0.
|
44
|
-
./spec/rspec/be_valid_when/is_type_spec.rb[1:8:2:2] | passed | 0.
|
45
|
-
./spec/rspec/be_valid_when/is_type_spec.rb[1:8:2:3] | passed | 0.
|
46
|
-
./spec/rspec/be_valid_when/is_type_spec.rb[1:9:1:1] | passed | 0.
|
47
|
-
./spec/rspec/be_valid_when/is_type_spec.rb[1:9:1:2] | passed | 0.
|
48
|
-
./spec/rspec/be_valid_when/is_type_spec.rb[1:9:2:1] | passed | 0.
|
49
|
-
./spec/rspec/be_valid_when/is_type_spec.rb[1:9:2:2] | passed | 0.
|
50
|
-
./spec/rspec/be_valid_when/is_type_spec.rb[1:9:2:3] | passed | 0.
|
51
|
-
./spec/rspec/be_valid_when/is_type_spec.rb[1:10:1:1] | passed | 0.
|
52
|
-
./spec/rspec/be_valid_when/is_type_spec.rb[1:10:1:2] | passed | 0.
|
53
|
-
./spec/rspec/be_valid_when/is_type_spec.rb[1:10:2:1] | passed | 0.
|
20
|
+
./spec/rspec/be_valid_when/is_type_spec.rb[1:2:2:3] | passed | 0.00028 seconds |
|
21
|
+
./spec/rspec/be_valid_when/is_type_spec.rb[1:3:1:1] | passed | 0.01122 seconds |
|
22
|
+
./spec/rspec/be_valid_when/is_type_spec.rb[1:3:1:2] | passed | 0.00011 seconds |
|
23
|
+
./spec/rspec/be_valid_when/is_type_spec.rb[1:3:2:1] | passed | 0.01112 seconds |
|
24
|
+
./spec/rspec/be_valid_when/is_type_spec.rb[1:3:2:2] | passed | 0.00012 seconds |
|
25
|
+
./spec/rspec/be_valid_when/is_type_spec.rb[1:3:2:3] | passed | 0.00029 seconds |
|
26
|
+
./spec/rspec/be_valid_when/is_type_spec.rb[1:4:1:1] | passed | 0.01026 seconds |
|
27
|
+
./spec/rspec/be_valid_when/is_type_spec.rb[1:4:1:2] | passed | 0.00013 seconds |
|
28
|
+
./spec/rspec/be_valid_when/is_type_spec.rb[1:4:2:1] | passed | 0.01107 seconds |
|
29
|
+
./spec/rspec/be_valid_when/is_type_spec.rb[1:4:2:2] | passed | 0.00013 seconds |
|
30
|
+
./spec/rspec/be_valid_when/is_type_spec.rb[1:4:2:3] | passed | 0.0003 seconds |
|
31
|
+
./spec/rspec/be_valid_when/is_type_spec.rb[1:5:1:1] | passed | 0.01011 seconds |
|
32
|
+
./spec/rspec/be_valid_when/is_type_spec.rb[1:5:1:2] | passed | 0.00014 seconds |
|
33
|
+
./spec/rspec/be_valid_when/is_type_spec.rb[1:5:2:1] | passed | 0.01106 seconds |
|
34
|
+
./spec/rspec/be_valid_when/is_type_spec.rb[1:5:2:2] | passed | 0.00014 seconds |
|
35
|
+
./spec/rspec/be_valid_when/is_type_spec.rb[1:5:2:3] | passed | 0.00027 seconds |
|
36
|
+
./spec/rspec/be_valid_when/is_type_spec.rb[1:6:1:1] | passed | 0.01034 seconds |
|
37
|
+
./spec/rspec/be_valid_when/is_type_spec.rb[1:6:1:2] | passed | 0.00014 seconds |
|
38
|
+
./spec/rspec/be_valid_when/is_type_spec.rb[1:6:2:1] | passed | 0.01091 seconds |
|
39
|
+
./spec/rspec/be_valid_when/is_type_spec.rb[1:6:2:2] | passed | 0.00012 seconds |
|
40
|
+
./spec/rspec/be_valid_when/is_type_spec.rb[1:6:2:3] | passed | 0.00028 seconds |
|
41
|
+
./spec/rspec/be_valid_when/is_type_spec.rb[1:7:1:1] | passed | 0.01106 seconds |
|
42
|
+
./spec/rspec/be_valid_when/is_type_spec.rb[1:7:1:2] | passed | 0.00013 seconds |
|
43
|
+
./spec/rspec/be_valid_when/is_type_spec.rb[1:7:2:1] | passed | 0.01117 seconds |
|
44
|
+
./spec/rspec/be_valid_when/is_type_spec.rb[1:7:2:2] | passed | 0.00014 seconds |
|
45
|
+
./spec/rspec/be_valid_when/is_type_spec.rb[1:7:2:3] | passed | 0.00025 seconds |
|
46
|
+
./spec/rspec/be_valid_when/is_type_spec.rb[1:8:1:1] | passed | 0.01021 seconds |
|
47
|
+
./spec/rspec/be_valid_when/is_type_spec.rb[1:8:1:2] | passed | 0.00014 seconds |
|
48
|
+
./spec/rspec/be_valid_when/is_type_spec.rb[1:8:2:1] | passed | 0.01087 seconds |
|
49
|
+
./spec/rspec/be_valid_when/is_type_spec.rb[1:8:2:2] | passed | 0.00016 seconds |
|
50
|
+
./spec/rspec/be_valid_when/is_type_spec.rb[1:8:2:3] | passed | 0.00027 seconds |
|
51
|
+
./spec/rspec/be_valid_when/is_type_spec.rb[1:9:1:1] | passed | 0.01123 seconds |
|
52
|
+
./spec/rspec/be_valid_when/is_type_spec.rb[1:9:1:2] | passed | 0.00012 seconds |
|
53
|
+
./spec/rspec/be_valid_when/is_type_spec.rb[1:9:2:1] | passed | 0.01098 seconds |
|
54
|
+
./spec/rspec/be_valid_when/is_type_spec.rb[1:9:2:2] | passed | 0.00013 seconds |
|
55
|
+
./spec/rspec/be_valid_when/is_type_spec.rb[1:9:2:3] | passed | 0.00028 seconds |
|
56
|
+
./spec/rspec/be_valid_when/is_type_spec.rb[1:10:1:1] | passed | 0.01248 seconds |
|
57
|
+
./spec/rspec/be_valid_when/is_type_spec.rb[1:10:1:2] | passed | 0.00013 seconds |
|
58
|
+
./spec/rspec/be_valid_when/is_type_spec.rb[1:10:2:1] | passed | 0.01291 seconds |
|
54
59
|
./spec/rspec/be_valid_when/is_type_spec.rb[1:10:2:2] | passed | 0.00013 seconds |
|
55
|
-
./spec/rspec/be_valid_when/is_type_spec.rb[1:10:2:3] | passed | 0.
|
56
|
-
./spec/rspec/be_valid_when/is_type_spec.rb[1:11:1:1] | passed | 0.
|
60
|
+
./spec/rspec/be_valid_when/is_type_spec.rb[1:10:2:3] | passed | 0.00028 seconds |
|
61
|
+
./spec/rspec/be_valid_when/is_type_spec.rb[1:11:1:1] | passed | 0.01267 seconds |
|
57
62
|
./spec/rspec/be_valid_when/is_type_spec.rb[1:11:1:2] | passed | 0.00013 seconds |
|
58
|
-
./spec/rspec/be_valid_when/is_type_spec.rb[1:11:2:1] | passed | 0.
|
59
|
-
./spec/rspec/be_valid_when/is_type_spec.rb[1:11:2:2] | passed | 0.
|
60
|
-
./spec/rspec/be_valid_when/is_type_spec.rb[1:11:2:3] | passed | 0.
|
61
|
-
./spec/rspec/be_valid_when/is_type_spec.rb[1:12:1:1] | passed | 0.
|
62
|
-
./spec/rspec/be_valid_when/is_type_spec.rb[1:12:1:2] | passed | 0.
|
63
|
-
./spec/rspec/be_valid_when/is_type_spec.rb[1:12:2:1] | passed | 0.
|
64
|
-
./spec/rspec/be_valid_when/is_type_spec.rb[1:12:2:2] | passed | 0.
|
65
|
-
./spec/rspec/be_valid_when/is_type_spec.rb[1:12:2:3] | passed | 0.
|
66
|
-
./spec/rspec/be_valid_when/is_type_spec.rb[1:13:1:1] | passed | 0.
|
67
|
-
./spec/rspec/be_valid_when/is_type_spec.rb[1:13:1:2] | passed | 0.
|
68
|
-
./spec/rspec/be_valid_when/is_type_spec.rb[1:13:2:1] | passed | 0.
|
63
|
+
./spec/rspec/be_valid_when/is_type_spec.rb[1:11:2:1] | passed | 0.01134 seconds |
|
64
|
+
./spec/rspec/be_valid_when/is_type_spec.rb[1:11:2:2] | passed | 0.00014 seconds |
|
65
|
+
./spec/rspec/be_valid_when/is_type_spec.rb[1:11:2:3] | passed | 0.0003 seconds |
|
66
|
+
./spec/rspec/be_valid_when/is_type_spec.rb[1:12:1:1] | passed | 0.01235 seconds |
|
67
|
+
./spec/rspec/be_valid_when/is_type_spec.rb[1:12:1:2] | passed | 0.00023 seconds |
|
68
|
+
./spec/rspec/be_valid_when/is_type_spec.rb[1:12:2:1] | passed | 0.01492 seconds |
|
69
|
+
./spec/rspec/be_valid_when/is_type_spec.rb[1:12:2:2] | passed | 0.00013 seconds |
|
70
|
+
./spec/rspec/be_valid_when/is_type_spec.rb[1:12:2:3] | passed | 0.00064 seconds |
|
71
|
+
./spec/rspec/be_valid_when/is_type_spec.rb[1:13:1:1] | passed | 0.01411 seconds |
|
72
|
+
./spec/rspec/be_valid_when/is_type_spec.rb[1:13:1:2] | passed | 0.00017 seconds |
|
73
|
+
./spec/rspec/be_valid_when/is_type_spec.rb[1:13:2:1] | passed | 0.0146 seconds |
|
69
74
|
./spec/rspec/be_valid_when/is_type_spec.rb[1:13:2:2] | passed | 0.00014 seconds |
|
70
75
|
./spec/rspec/be_valid_when/is_type_spec.rb[1:13:2:3] | passed | 0.00031 seconds |
|
71
|
-
./spec/rspec/
|
72
|
-
./spec/rspec/
|
73
|
-
./spec/rspec/
|
74
|
-
./spec/rspec/
|
75
|
-
./spec/rspec/
|
76
|
-
./spec/rspec/be_valid_when_matcher_spec.rb[1:1:
|
77
|
-
./spec/rspec/be_valid_when_matcher_spec.rb[1:1:
|
78
|
-
./spec/rspec/be_valid_when_matcher_spec.rb[1:1:
|
79
|
-
./spec/rspec/be_valid_when_matcher_spec.rb[1:1:
|
80
|
-
./spec/rspec/be_valid_when_matcher_spec.rb[1:1:
|
81
|
-
./spec/rspec/be_valid_when_matcher_spec.rb[1:1
|
82
|
-
./spec/rspec/be_valid_when_matcher_spec.rb[1:
|
83
|
-
./spec/rspec/be_valid_when_matcher_spec.rb[1:1:8] | passed | 0.00062 seconds |
|
84
|
-
./spec/rspec/be_valid_when_matcher_spec.rb[1:1:9] | passed | 0.0001 seconds |
|
85
|
-
./spec/rspec/be_valid_when_matcher_spec.rb[1:1:10] | passed | 0.00008 seconds |
|
86
|
-
./spec/rspec/be_valid_when_matcher_spec.rb[1:2:1] | passed | 0.0001 seconds |
|
87
|
-
./spec/rspec/be_valid_when_matcher_spec.rb[1:2:2] | passed | 0.00013 seconds |
|
76
|
+
./spec/rspec/be_valid_when_matcher_spec.rb[1:1:1] | passed | 0.00058 seconds |
|
77
|
+
./spec/rspec/be_valid_when_matcher_spec.rb[1:1:2] | passed | 0.0001 seconds |
|
78
|
+
./spec/rspec/be_valid_when_matcher_spec.rb[1:1:3] | passed | 0.00011 seconds |
|
79
|
+
./spec/rspec/be_valid_when_matcher_spec.rb[1:1:4] | passed | 0.00221 seconds |
|
80
|
+
./spec/rspec/be_valid_when_matcher_spec.rb[1:1:5] | passed | 0.00008 seconds |
|
81
|
+
./spec/rspec/be_valid_when_matcher_spec.rb[1:1:6] | passed | 0.00008 seconds |
|
82
|
+
./spec/rspec/be_valid_when_matcher_spec.rb[1:1:7] | passed | 0.00008 seconds |
|
83
|
+
./spec/rspec/be_valid_when_matcher_spec.rb[1:1:8] | passed | 0.00008 seconds |
|
84
|
+
./spec/rspec/be_valid_when_matcher_spec.rb[1:1:9] | passed | 0.00008 seconds |
|
85
|
+
./spec/rspec/be_valid_when_matcher_spec.rb[1:1:10] | passed | 0.00007 seconds |
|
86
|
+
./spec/rspec/be_valid_when_matcher_spec.rb[1:2:1] | passed | 0.00012 seconds |
|
87
|
+
./spec/rspec/be_valid_when_matcher_spec.rb[1:2:2] | passed | 0.00011 seconds |
|
88
88
|
./spec/rspec/be_valid_when_matcher_spec.rb[1:2:3:1] | passed | 0.00012 seconds |
|
89
|
-
./spec/rspec/be_valid_when_matcher_spec.rb[1:2:3:2] | passed | 0.
|
90
|
-
./spec/rspec/be_valid_when_matcher_spec.rb[1:2:3:3] | passed | 0.
|
91
|
-
./spec/rspec/be_valid_when_matcher_spec.rb[1:2:3:4] | passed | 0.
|
89
|
+
./spec/rspec/be_valid_when_matcher_spec.rb[1:2:3:2] | passed | 0.00011 seconds |
|
90
|
+
./spec/rspec/be_valid_when_matcher_spec.rb[1:2:3:3] | passed | 0.00009 seconds |
|
91
|
+
./spec/rspec/be_valid_when_matcher_spec.rb[1:2:3:4] | passed | 0.00009 seconds |
|
92
92
|
./spec/rspec/be_valid_when_matcher_spec.rb[1:2:3:5] | passed | 0.00013 seconds |
|
93
93
|
./spec/rspec/be_valid_when_matcher_spec.rb[1:3:1] | passed | 0.00009 seconds |
|
94
|
-
./spec/rspec/be_valid_when_matcher_spec.rb[1:3:2:1] | passed | 0.
|
95
|
-
./spec/rspec/be_valid_when_matcher_spec.rb[1:3:2:2] | passed | 0.
|
94
|
+
./spec/rspec/be_valid_when_matcher_spec.rb[1:3:2:1] | passed | 0.00073 seconds |
|
95
|
+
./spec/rspec/be_valid_when_matcher_spec.rb[1:3:2:2] | passed | 0.00072 seconds |
|
96
96
|
./spec/rspec/be_valid_when_matcher_spec.rb[1:4:1] | passed | 0.00009 seconds |
|
97
|
-
./spec/rspec/be_valid_when_matcher_spec.rb[1:4:2:1] | passed | 0.
|
97
|
+
./spec/rspec/be_valid_when_matcher_spec.rb[1:4:2:1] | passed | 0.00072 seconds |
|
98
98
|
./spec/rspec/be_valid_when_matcher_spec.rb[1:4:2:2] | passed | 0.00078 seconds |
|
99
|
-
./spec/rspec/be_valid_when_matcher_spec.rb[1:5] | passed | 0.
|
100
|
-
./spec/rspec/be_valid_when_matcher_spec.rb[1:6:1] | passed | 0.
|
101
|
-
./spec/rspec/be_valid_when_matcher_spec.rb[1:6:2] | passed | 0.
|
99
|
+
./spec/rspec/be_valid_when_matcher_spec.rb[1:5] | passed | 0.00115 seconds |
|
100
|
+
./spec/rspec/be_valid_when_matcher_spec.rb[1:6:1] | passed | 0.00014 seconds |
|
101
|
+
./spec/rspec/be_valid_when_matcher_spec.rb[1:6:2] | passed | 0.00014 seconds |
|
102
102
|
./spec/rspec/be_valid_when_matcher_spec.rb[1:6:3] | passed | 0.0001 seconds |
|
103
|
-
./spec/rspec/be_valid_when_matcher_spec.rb[1:6:4] | passed | 0.
|
104
|
-
./spec/rspec/be_valid_when_matcher_spec.rb[1:7:1:1] | passed | 0.
|
105
|
-
./spec/rspec/be_valid_when_matcher_spec.rb[1:7:1:2] | passed | 0.
|
106
|
-
./spec/rspec/be_valid_when_matcher_spec.rb[1:7:2:1] | passed | 0.
|
107
|
-
./spec/rspec/be_valid_when_matcher_spec.rb[1:7:2:2] | passed | 0.
|
108
|
-
./spec/rspec/be_valid_when_matcher_spec.rb[1:8:1] | passed | 0.
|
109
|
-
./spec/rspec/be_valid_when_matcher_spec.rb[1:8:2:1] | passed | 0.
|
110
|
-
./spec/rspec/be_valid_when_matcher_spec.rb[1:9:1] | passed | 0.
|
103
|
+
./spec/rspec/be_valid_when_matcher_spec.rb[1:6:4] | passed | 0.00009 seconds |
|
104
|
+
./spec/rspec/be_valid_when_matcher_spec.rb[1:7:1:1] | passed | 0.00072 seconds |
|
105
|
+
./spec/rspec/be_valid_when_matcher_spec.rb[1:7:1:2] | passed | 0.00196 seconds |
|
106
|
+
./spec/rspec/be_valid_when_matcher_spec.rb[1:7:2:1] | passed | 0.00072 seconds |
|
107
|
+
./spec/rspec/be_valid_when_matcher_spec.rb[1:7:2:2] | passed | 0.00187 seconds |
|
108
|
+
./spec/rspec/be_valid_when_matcher_spec.rb[1:8:1] | passed | 0.00129 seconds |
|
109
|
+
./spec/rspec/be_valid_when_matcher_spec.rb[1:8:2:1] | passed | 0.0008 seconds |
|
110
|
+
./spec/rspec/be_valid_when_matcher_spec.rb[1:9:1] | passed | 0.0001 seconds |
|
data/spec/spec_helper.rb
CHANGED
@@ -12,6 +12,12 @@
|
|
12
12
|
#
|
13
13
|
# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
|
14
14
|
|
15
|
+
# Setup Code Climate test reporter.
|
16
|
+
require 'codeclimate-test-reporter'
|
17
|
+
|
18
|
+
CodeClimate::TestReporter.start
|
19
|
+
|
20
|
+
# Allow using 'be_valid_when' everywhere.
|
15
21
|
require 'rspec/be_valid_when_matcher'
|
16
22
|
|
17
23
|
RSpec.configure do |config|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rspec-be_valid_when_matcher
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marek Tuchowski
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-09-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|