Sha256: f52c6f3bf7fb9084b78f9e25330984578fe7ce67dd2be9667d37ceb549413a0f
Contents?: true
Size: 1.05 KB
Versions: 11
Compression:
Stored size: 1.05 KB
Contents
require 'turnip_formatter/printer' require 'turnip_formatter/printer/step_extra_args' module TurnipFormatter module Printer class RuntimeError class << self include TurnipFormatter::Printer include RSpec::Core::BacktraceFormatter def print_out(example, exception) exception.set_backtrace(format_backtrace(exception.backtrace)) render_template(:runtime_exception, { example: example, runtime_exception: runtime_exception(exception), example_exception: example_exception(example), } ) end private def runtime_exception(exception) render_template(:exception, { title: 'Runtime', exception: exception }) end def example_exception(example) unless example.exception '' else render_template(:exception, { title: 'Example', exception: example.exception } ) end end end end end end
Version data entries
11 entries across 11 versions & 1 rubygems