test/unit/minitest/minitest_reporter_plugin_test.rb
raw| 1 | require_relative "../../test_helper" |
| 2 | |
| 3 | module MinitestReportersTest |
| 4 | class MinitestReporterPluginTest < Minitest::Test |
| 5 | def test_delegates_io |
| 6 | reporter = Minitest::Reporters::DefaultReporter.new |
| 7 | io_handle = STDOUT |
| 8 | dr = Minitest::Reporters::DelegateReporter.new([ reporter ], :io => io_handle) |
| 9 | assert_equal io_handle, dr.io |
| 10 | dr.send :all_reporters |
| 11 | assert_equal io_handle, reporter.io |
| 12 | end |
| 13 | end |
| 14 | end |