14: def run(reporter, before_each_block, after_each_block, dry_run, execution_context, timeout=nil)
15: @dry_run = dry_run
16: reporter.example_started(description)
17: return reporter.example_finished(description) if dry_run
18:
19: errors = []
20: location = nil
21: Timeout.timeout(timeout) do
22: before_each_ok = setup_example(execution_context, errors, &before_each_block)
23: example_ok = run_example(execution_context, errors) if before_each_ok
24: after_each_ok = teardown_example(execution_context, errors, &after_each_block)
25: location = failure_location(before_each_ok, example_ok, after_each_ok)
26: end
27:
28: ExampleShouldRaiseHandler.new(@from, @options).handle(errors)
29: reporter.example_finished(description, errors.first, location, @example_block.nil?) if reporter
30: end