moved capture_stdout to test/helper.rb