@@ -291,14 +291,18 @@ If you want to enable this feature everywhere, you can use [`define_derived_meta
291
291
~~~ ruby
292
292
RSpec .configure do |c |
293
293
c.define_derived_metadata do |meta |
294
- meta[:aggregate_failures ] = true
294
+ meta[:aggregate_failures ] = true unless meta.key?( :aggregate_failures )
295
295
end
296
296
end
297
297
~~~
298
298
299
- Of course, you may not want this enabled everywhere. When you've got _ dependent_ expectations
300
- (e.g. where an expectation only makes sense if the prior expectation passed), or if you're
301
- using expectations to express a pre-condition, you'll probably want the example to immediately abort
299
+
300
+ Of course, you may not want this enabled by default everywhere. The
301
+ ` unless meta.key?(:aggregate_failures) ` bit allows you to opt out individual
302
+ examples or groups by tagging them with ` aggregate_failures: false ` . When
303
+ you've got _ dependent_ expectations (e.g. where an expectation only makes
304
+ sense if the prior expectation passed), or if you're using expectations to
305
+ express a pre-condition, you'll probably want the example to immediately abort
302
306
when the expectation fails.
303
307
304
308
### Expectations: Improved Failure Output
@@ -335,7 +339,7 @@ Failure/Error: expect([Time.now]).to include(Time.now)
335
339
+[2015-06-09 07:49:16.610635000 -0700]
336
340
~~~
337
341
338
- ...which makes it much clearer that the time objects differ at the level of milliseconds .
342
+ ...which makes it much clearer that the time objects differ at the subsecond level .
339
343
340
344
Thanks to Gavin Miller, Nicholas Chmielewski and Siva Gollapalli for contributing to
341
345
these improvements!
0 commit comments