def silence_stdout(return_stringio = false)
      old_stdout = $stdout; old_stderr = $stderr
      $stdout = stdout = StringIO.new
      $stderr = stderr = StringIO.new
      output  = yield

      if return_stringio
        return [
          stdout.string,
          stderr.string
        ]
      else
        return output
      end
    ensure
      $stdout = old_stdout
      $stderr = old_stderr
    end
def silence_stdout(return_stringio = false)
      old_stdout = $stdout; old_stderr = $stderr
      $stdout = stdout = StringIO.new
      $stderr = stderr = StringIO.new
      output  = yield

      if return_stringio
        return [
          stdout.string,
          stderr.string
        ]
      else
        return output
      end
    ensure
      $stdout = old_stdout
      $stderr = old_stderr
    end
------------------------------------------------------------------------
 Allows you to run something capturing all errors and output so you can
 run a test cleanly without a bunch of noise, nobody likes noise when they
 are just trying to see the result of a failed test.
 ------------------------------------------------------------------------