test/test_helper.rb in download_tv-2.1.1 vs test/test_helper.rb in download_tv-2.2.0
- old
+ new
@@ -3,7 +3,16 @@
require "minitest/autorun"
def create_dummy_config(in_path, config={})
+ config[:version] = DownloadTV::VERSION if !config[:version]
File.open(in_path, "wb") { |f| Marshal.dump(config, f) }
+end
+
+def run_silently
+ previous_stdout, $stdout = $stdout, StringIO.new
+ yield
+ $stdout.string
+ensure
+ $stdout = previous_stdout
end
\ No newline at end of file