Class: Test::Unit::TestCase

Inherits:
MiniTest::Unit::TestCase
  • Object
show all
Includes:
Assertions
Defined in:
lib/test/unit/testcase.rb,
lib/test/unit/parallel.rb

Constant Summary

Constants included from Assertions

Assertions::MINI_DIR, Assertions::UNASSIGNED

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Assertions

#assert, #assert_block, #assert_equal, #assert_no_match, #assert_not_equal, #assert_not_nil, #assert_not_same, #assert_not_send, #assert_nothing_raised, #assert_nothing_thrown, #assert_raise, #assert_respond_to, #assert_send, #build_message, #mu_pp

Class Method Details

.method_added(name) ⇒ Object



24
25
26
27
28
29
30
31
# File 'lib/test/unit/testcase.rb', line 24

def self.method_added(name)
  return unless name.to_s.start_with?("test_")
  @test_methods ||= {}
  if @test_methods[name]
    warn "test/unit warning: method #{ self }##{ name } is redefined"
  end
  @test_methods[name] = true
end

.test_orderObject



20
21
22
# File 'lib/test/unit/testcase.rb', line 20

def self.test_order
  :sorted
end

Instance Method Details

#on_parallel_worker?Boolean

Returns:

  • (Boolean)


11
12
13
# File 'lib/test/unit/testcase.rb', line 11

def on_parallel_worker?
  false
end

#run(runner) ⇒ Object



15
16
17
18
# File 'lib/test/unit/testcase.rb', line 15

def run runner
  @options = runner.options
  super runner
end