Class: Nestor::Mappers::Rails::Test::TestRunner

Inherits:
Test::Unit::UI::Console::TestRunner
  • Object
show all
Defined in:
lib/nestor/mappers/rails/test/unit.rb

Overview

A helper class that allows me to get more information from the build.

This is something that definitely will change when Nestor is tested on Ruby 1.9.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#faultsObject (readonly)

:nodoc:



250
251
252
# File 'lib/nestor/mappers/rails/test/unit.rb', line 250

def faults
  @faults
end

Instance Method Details

#passed?Boolean

Returns pass/fail status.

Returns:

  • (Boolean)


261
262
263
# File 'lib/nestor/mappers/rails/test/unit.rb', line 261

def passed?
  @faults.empty?
end

#run(suite, output_level = NORMAL) ⇒ Object

This is a duck-typing method. Test::Unit’s design requiers a #run method, but it is implemented as a class method. I fake it here to allow me to pass an instance and have the actual TestRunner instance available afterwards.



255
256
257
258
# File 'lib/nestor/mappers/rails/test/unit.rb', line 255

def run(suite, output_level=NORMAL)
  @suite = suite.respond_to?(:suite) ? suite.suite : suite
  start
end