module TestUnitHelper::InstanceMethods
Container for methods that are added to Test::Unit::TestCase
as instance methods.
Public Class Methods
new(*args)
click to toggle source
Override initialize to add a few things.
Calls superclass method
# File lib/test_unit_helper/instance_methods.rb, line 39 def initialize(*args) super reset_io unless self.class.test_class.nil? @class = Kernel.const_get(self.class.test_class) end end
Private Instance Methods
err()
click to toggle source
The output from stderr while wrap_output
was in effect.
Output¶ ↑
- String
-
The output from stderr.
# File lib/test_unit_helper/instance_methods.rb, line 81 def err @err.respond_to?(:string) ? @err.string.sub(/\n*\z/, '') : '' end
out()
click to toggle source
The output from stdout while wrap_output
was in effect.
Output¶ ↑
- String
-
The output from stdout.
# File lib/test_unit_helper/instance_methods.rb, line 74 def out @out.respond_to?(:string) ? @out.string.sub(/\n*\z/, '') : '' end
real_finis()
click to toggle source
reset_io()
click to toggle source
Reset the stdout and stderr stream variables.
# File lib/test_unit_helper/instance_methods.rb, line 86 def reset_io @out = StringIO.new @err = StringIO.new end
wrap_output() { || ... }
click to toggle source