test/helper.rb in cri-2.7.0 vs test/helper.rb in cri-2.7.1

- old
+ new

@@ -1,7 +1,5 @@ -# encoding: utf-8 - require 'coveralls' Coveralls.wear! require 'minitest' require 'minitest/autorun' @@ -18,19 +16,19 @@ def teardown uncapture_io(*@orig_io) end - def capture_io_while(&block) + def capture_io_while orig_io = capture_io - block.call + yield [$stdout.string, $stderr.string] ensure uncapture_io(*orig_io) end def lines(string) - string.scan(/^.*\n/).map { |s| s.chomp } + string.scan(/^.*\n/).map(&:chomp) end private def capture_io