Module: ErrorToCommunicate::ExceptionRecorder

Extended by:
ExceptionRecorder
Included in:
ExceptionRecorder
Defined in:
lib/error_to_communicate/rspec_formatter.rb

Instance Method Summary collapse

Instance Method Details

#record_exception_bindings(config) ⇒ Object



67
68
69
70
71
72
# File 'lib/error_to_communicate/rspec_formatter.rb', line 67

def record_exception_bindings(config)
  config.around do |spec|
    Thread.current[:e2c_last_binding_seen] = nil
    Interception.listen(spec) { |_exc, binding| Thread.current[:e2c_last_binding_seen] ||= binding }
  end
end