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

#initializeInternalData

Returns a new instance of InternalData.



555
556
557
558
559
560
561
562
# File 'lib/test/unit/testcase.rb', line 555

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

Instance Attribute Details

#elapsed_timeObject (readonly)

Returns the value of attribute elapsed_time.



553
554
555
# File 'lib/test/unit/testcase.rb', line 553

def elapsed_time
  @elapsed_time
end

#start_timeObject (readonly)

Returns the value of attribute start_time.



553
554
555
# File 'lib/test/unit/testcase.rb', line 553

def start_time
  @start_time
end

#test_dataObject (readonly)

Returns the value of attribute test_data.



554
555
556
# File 'lib/test/unit/testcase.rb', line 554

def test_data
  @test_data
end

#test_data_labelObject (readonly)

Returns the value of attribute test_data_label.



554
555
556
# File 'lib/test/unit/testcase.rb', line 554

def test_data_label
  @test_data_label
end

Instance Method Details

#assign_test_data(label, data) ⇒ Object



572
573
574
575
# File 'lib/test/unit/testcase.rb', line 572

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

#have_test_data?Boolean

Returns:

  • (Boolean)


577
578
579
# File 'lib/test/unit/testcase.rb', line 577

def have_test_data?
  not @test_data_label.nil?
end

#interruptedObject



593
594
595
# File 'lib/test/unit/testcase.rb', line 593

def interrupted
  @interrupted = true
end

#interrupted?Boolean

Returns:

  • (Boolean)


568
569
570
# File 'lib/test/unit/testcase.rb', line 568

def interrupted?
  @interrupted
end

#passed?Boolean

Returns:

  • (Boolean)


564
565
566
# File 'lib/test/unit/testcase.rb', line 564

def passed?
  @passed
end

#problem_occurredObject



589
590
591
# File 'lib/test/unit/testcase.rb', line 589

def problem_occurred
  @passed = false
end

#test_finishedObject



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

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

#test_startedObject



581
582
583
# File 'lib/test/unit/testcase.rb', line 581

def test_started
  @start_time = Time.now
end