Module: AggregateAssertions::TestPatch
- Defined in:
- lib/aggregate_assertions.rb
Overview
Contains patches to the Minitest::Test class
Instance Method Summary collapse
Instance Method Details
#aggregate_assertions(label = nil, &block) ⇒ Object
19 20 21 22 23 |
# File 'lib/aggregate_assertions.rb', line 19 def aggregate_assertions(label = nil, &block) flunk "aggregate_assertions requires a block" unless block_given? AssertionAggregator.wrap(label, &block) end |
#assert(test, msg = nil) ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/aggregate_assertions.rb', line 11 def assert(test, msg = nil) super rescue Minitest::Assertion, StandardError => e raise unless AssertionAggregator.active? AssertionAggregator.add_error(e) end |