class MicroTest::TestMethod
Encapsualtes test method for execution by RubyTest. Mainly this separate encapsulation allows the test description to be something other than just the method name, e.g. if the ‘MicroTest.natural_names` flag is set to true.
Public Class Methods
new(testcase, method)
click to toggle source
# File lib/microtest.rb, line 89 def initialize(testcase, method) @testcase = testcase @method = method end
Public Instance Methods
call()
click to toggle source
# File lib/microtest.rb, line 94 def call @testcase.setup @method.call @testcase.teardown end
to_s()
click to toggle source
# File lib/microtest.rb, line 100 def to_s name = @method.name.to_s name.gsub!('_', ' ') if MicroTest.natural_names return name end