Get the output of the console on teardown

Hi,
I would like to get the output of the console after the test is run to
analyze source code errors and other things…
I am using Ruby 2 and test-unit 3

Any idea how can i do it?