test/test_backtrace.rb in backtrace-0.2.0 vs test/test_backtrace.rb in backtrace-0.3.0

- old
+ new

@@ -44,9 +44,21 @@ raise 'It is intended' end assert(log.sent.include?('intended')) end + def test_runs_a_block_to_console + Backtrace.exec(swallow: true, mine: 'backtrace') do + raise 'It is intended' + end + end + + def test_runs_a_block_to_broken_log + Backtrace.exec(swallow: true, log: Object.new) do + raise 'It is intended' + end + end + class FakeLog attr_reader :sent def error(msg) @sent = msg end