Class: Test::Unit::TestCase::InternalData — test-unit - test-unit

Class: Test::Unit::TestCase::InternalData

Inherits:
Object
  • Object
show all
Defined in:
lib/test/unit/testcase.rb

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Constructor Details

- (InternalData) initialize

A new instance of InternalData



588
589
590
591
592
593
594
595
# File 'lib/test/unit/testcase.rb', line 588

def initialize
  @start_time = nil
  @elapsed_time = nil
  @passed = true
  @interrupted = false
  @test_data_label = nil
  @test_data = nil
end

Instance Attribute Details

- (Object) elapsed_time (readonly)

Returns the value of attribute elapsed_time



586
587
588
# File 'lib/test/unit/testcase.rb', line 586

def elapsed_time
  @elapsed_time
end

- (Object) start_time (readonly)

Returns the value of attribute start_time



586
587
588
# File 'lib/test/unit/testcase.rb', line 586

def start_time
  @start_time
end

- (Object) test_data (readonly)

Returns the value of attribute test_data



587
588
589
# File 'lib/test/unit/testcase.rb', line 587

def test_data
  @test_data
end

- (Object) test_data_label (readonly)

Returns the value of attribute test_data_label



587
588
589
# File 'lib/test/unit/testcase.rb', line 587

def test_data_label
  @test_data_label
end

Instance Method Details

- (Object) assign_test_data(label, data)



605
606
607
608
# File 'lib/test/unit/testcase.rb', line 605

def assign_test_data(label, data)
  @test_data_label = label
  @test_data = data
end

- (Boolean) have_test_data?

Returns:

  • (Boolean)


610
611
612
# File 'lib/test/unit/testcase.rb', line 610

def have_test_data?
  not @test_data_label.nil?
end

- (Object) interrupted



626
627
628
# File 'lib/test/unit/testcase.rb', line 626

def interrupted
  @interrupted = true
end

- (Boolean) interrupted?

Returns:

  • (Boolean)


601
602
603
# File 'lib/test/unit/testcase.rb', line 601

def interrupted?
  @interrupted
end

- (Boolean) passed?

Returns:

  • (Boolean)


597
598
599
# File 'lib/test/unit/testcase.rb', line 597

def passed?
  @passed
end

- (Object) problem_occurred



622
623
624
# File 'lib/test/unit/testcase.rb', line 622

def problem_occurred
  @passed = false
end

- (Object) test_finished



618
619
620
# File 'lib/test/unit/testcase.rb', line 618

def test_finished
  @elapsed_time = Time.now - @start_time
end

- (Object) test_started



614
615
616
# File 'lib/test/unit/testcase.rb', line 614

def test_started
  @start_time = Time.now
end