$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__) require 'mida' def html_wrap(html) "#{html}" end # Return the last error message on STDERR. # Prevents the message being output to STDERR. def last_stderr orig_stderr = $stderr $stderr = StringIO.new yield $stderr.rewind message = $stderr.string.chomp $stderr = orig_stderr message end