Class: MiniTest::Unit::TestCase

Inherits:
Object
  • Object
show all
Defined in:
lib/turn/runners/minirunner.rb,
lib/turn/autorun/minitest.rb

Instance Method Summary collapse

Instance Method Details

#run(runner) ⇒ Object

Overwrite #run method so that is uses symbols as return values rather than characters.



168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
# File 'lib/turn/runners/minirunner.rb', line 168

def run(runner)
  result = :pass
  begin
    @passed = nil
    self.setup
    self.__send__(self.__name__.to_s)
    @passed = true
  rescue Exception => e
    @passed = false
    result = runner.puke(self.class, self.__name__.to_s, e)
  ensure
    begin
      self.teardown
    rescue Exception => e
      result = runner.puke(self.class, self.__name__.to_s, e)
    end
  end
  result
end