report $output content when test fails

in some cases, its not easy to find why test failed. i saw one sollution with custom assert_equal. but its useful to have the content of $output printent out when test fails.

i'm not sure that this is the 100perc correct place, but this worked fine for me and i was able to fix my tests then.