Class: Context::TestSuite

Inherits:
Test::Unit::TestSuite
  • Object
show all
Defined in:
lib/context/suite.rb

Instance Method Summary collapse

Instance Method Details

#run(result) {|STARTED, name| ... } ⇒ Object

Runs the tests and/or suites contained in this TestSuite.

Yields:

  • (STARTED, name)


24
25
26
27
28
29
30
31
32
33
# File 'lib/context/suite.rb', line 24

def run(result, &progress_block) # :nodoc:
  yield(STARTED, name)
  ivars_from_callback = @tests.first.run_all_callbacks(:before) if @tests.first.is_a?(Context.core_class)
  @tests.each do |test|
    test.set_values_from_callbacks(ivars_from_callback) if ivars_from_callback
    test.run(result, &progress_block)
  end
  ivars_from_callback = @tests.first.run_all_callbacks(:after) if ivars_from_callback
  yield(FINISHED, name)
end