5
6
7
8
9
10
11
12
13
14
15
16
|
# File 'lib/enhanced/minitest_patch.rb', line 5
def run_one_method(klass, method_name)
EnhancedErrors.start_minitest_binding_capture
result = original_run_one_method(klass, method_name)
ensure
begin
binding_infos = EnhancedErrors.stop_minitest_binding_capture
EnhancedErrors.override_exception_message(result.failures.last, binding_infos) if result.failures.any?
Enhanced::ExceptionContext.clear_all
rescue => e
puts "Ignored error during error enhancement: #{e}"
end
end
|