Class: MicroTest::TestMethod

Inherits:
Object
  • Object
show all
Defined in:
lib/microtest.rb

Instance Method Summary collapse

Constructor Details

#initialize(method) ⇒ TestMethod

Returns a new instance of TestMethod.



62
63
64
# File 'lib/microtest.rb', line 62

def initialize(method)
  @method = method
end

Instance Method Details

#callObject



66
67
68
# File 'lib/microtest.rb', line 66

def call
  @method.call
end

#to_sObject



70
71
72
73
74
# File 'lib/microtest.rb', line 70

def to_s
  name = @method.name.to_s  
  name.gsub!('_', ' ') if MicroTest.natural_names
  return name
end