Class: Test::Unit::TestSuite
Overview
:nodoc:
Instance Method Summary collapse
Instance Method Details
#position ⇒ Object
453 454 455 |
# File 'lib/test/spec.rb', line 453 def position @tests.first.respond_to?(:position) ? @tests.first.position : 0 end |
#run(result) {|STARTED, name| ... } ⇒ Object
438 439 440 441 442 443 444 445 |
# File 'lib/test/spec.rb', line 438 def run(result, &progress_block) sort! yield(STARTED, name) @tests.each do |test| test.run(result, &progress_block) end yield(FINISHED, name) end |
#sort! ⇒ Object
447 448 449 450 451 |
# File 'lib/test/spec.rb', line 447 def sort! @tests = @tests.sort_by { |test| test.respond_to?(:position) ? test.position : 0 } end |