|
29 | 29 | it { is_expected.to be_invalid_with_error :foo, :size_equal_to }
|
30 | 30 | end
|
31 | 31 |
|
32 |
| - context "when attribute is not an array" do |
33 |
| - let(:foo) { 1 } |
| 32 | + context "when attribute has no size" do |
| 33 | + let(:foo) { double } |
34 | 34 | it { is_expected.to be_invalid_with_error :foo, :size_equal_to }
|
35 | 35 | end
|
36 | 36 | end
|
|
53 | 53 | it { is_expected.to be_valid }
|
54 | 54 | end
|
55 | 55 |
|
56 |
| - context "when attribute is not an array" do |
57 |
| - let(:foo) { 1 } |
| 56 | + context "when attribute has no size" do |
| 57 | + let(:foo) { double } |
58 | 58 | it { is_expected.to be_invalid_with_error :foo, :size_other_than }
|
59 | 59 | end
|
60 | 60 | end
|
|
77 | 77 | it { is_expected.to be_valid }
|
78 | 78 | end
|
79 | 79 |
|
80 |
| - context "when attribute is not an array" do |
81 |
| - let(:foo) { 1 } |
| 80 | + context "when attribute has no size" do |
| 81 | + let(:foo) { double } |
82 | 82 | it { is_expected.to be_invalid_with_error :foo, :size_greater_than }
|
83 | 83 | end
|
84 | 84 | end
|
|
106 | 106 | it { is_expected.to be_valid }
|
107 | 107 | end
|
108 | 108 |
|
109 |
| - context "when attribute is not an array" do |
110 |
| - let(:foo) { 1 } |
| 109 | + context "when attribute has no size" do |
| 110 | + let(:foo) { double } |
111 | 111 | it do
|
112 | 112 | is_expected
|
113 | 113 | .to be_invalid_with_error :foo, :size_greater_than_or_equal_to
|
|
133 | 133 | it { is_expected.to be_invalid_with_error :foo, :size_less_than }
|
134 | 134 | end
|
135 | 135 |
|
136 |
| - context "when attribute is not an array" do |
137 |
| - let(:foo) { 1 } |
| 136 | + context "when attribute has no size" do |
| 137 | + let(:foo) { double } |
138 | 138 | it { is_expected.to be_invalid_with_error :foo, :size_less_than }
|
139 | 139 | end
|
140 | 140 | end
|
|
159 | 159 | end
|
160 | 160 | end
|
161 | 161 |
|
162 |
| - context "when attribute is not an array" do |
163 |
| - let(:foo) { 1 } |
| 162 | + context "when attribute has no size" do |
| 163 | + let(:foo) { double } |
164 | 164 | it do
|
165 | 165 | is_expected.to be_invalid_with_error :foo, :size_less_than_or_equal_to
|
166 | 166 | end
|
|
189 | 189 | end
|
190 | 190 | end
|
191 | 191 |
|
192 |
| - context "when attribute is not an array" do |
193 |
| - let(:foo) { 1 } |
| 192 | + context "when attribute has no size" do |
| 193 | + let(:foo) { double } |
194 | 194 | it do
|
195 | 195 | is_expected.to be_invalid_with_error :foo, :size_equal_to_bar_baz
|
196 | 196 | end
|
|
217 | 217 | it { is_expected.to be_valid }
|
218 | 218 | end
|
219 | 219 |
|
220 |
| - context "when attribute is not an array" do |
221 |
| - let(:foo) { 1 } |
| 220 | + context "when attribute has no size" do |
| 221 | + let(:foo) { double } |
222 | 222 | it do
|
223 | 223 | is_expected.to be_invalid_with_error :foo, :size_other_than_bar_baz
|
224 | 224 | end
|
|
247 | 247 | it { is_expected.to be_valid }
|
248 | 248 | end
|
249 | 249 |
|
250 |
| - context "when attribute is not an array" do |
251 |
| - let(:foo) { 1 } |
| 250 | + context "when attribute has no size" do |
| 251 | + let(:foo) { double } |
252 | 252 | it do
|
253 | 253 | is_expected.to be_invalid_with_error :foo, :size_greater_than_bar_baz
|
254 | 254 | end
|
|
280 | 280 | it { is_expected.to be_valid }
|
281 | 281 | end
|
282 | 282 |
|
283 |
| - context "when attribute is not an array" do |
284 |
| - let(:foo) { 1 } |
| 283 | + context "when attribute has no size" do |
| 284 | + let(:foo) { double } |
285 | 285 | it do
|
286 | 286 | is_expected
|
287 | 287 | .to be_invalid_with_error :foo, :size_greater_than_or_equal_to_bar_baz
|
|
307 | 307 | it { is_expected.to be_invalid_with_error :foo, :size_less_than_bar_baz }
|
308 | 308 | end
|
309 | 309 |
|
310 |
| - context "when attribute is not an array" do |
311 |
| - let(:foo) { 1 } |
| 310 | + context "when attribute has no size" do |
| 311 | + let(:foo) { double } |
312 | 312 | it { is_expected.to be_invalid_with_error :foo, :size_less_than_bar_baz }
|
313 | 313 | end
|
314 | 314 | end
|
|
336 | 336 | end
|
337 | 337 | end
|
338 | 338 |
|
339 |
| - context "when attribute is not an array" do |
340 |
| - let(:foo) { 1 } |
| 339 | + context "when attribute has no size" do |
| 340 | + let(:foo) { double } |
341 | 341 | it do
|
342 | 342 | is_expected.to be_invalid_with_error \
|
343 | 343 | :foo, :size_less_than_or_equal_to_bar_baz
|
|
0 commit comments