File: test-output.rb

package info (click to toggle)
ruby-test-unit 3.6.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,280 kB
  • sloc: ruby: 15,493; makefile: 9
file content (11 lines) | stat: -rw-r--r-- 269 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
require 'test/unit'

class TestUnitOutput < Test::Unit::TestCase
  def test_capture_output
    assert_equal(["stdout\n", "stderr\n"],
                 capture_output do
                   puts("stdout")
                   warn("stderr")
                 end)
  end
end