Class: MicroTest::TestMethod
- Inherits:
-
Object
- Object
- MicroTest::TestMethod
- Defined in:
- lib/microtest.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(method) ⇒ TestMethod
constructor
A new instance of TestMethod.
- #to_s ⇒ Object
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
#call ⇒ Object
66 67 68 |
# File 'lib/microtest.rb', line 66 def call @method.call end |
#to_s ⇒ Object
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 |