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.



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

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.



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

def elapsed_time
  @elapsed_time
end

#start_timeObject (readonly)

Returns the value of attribute start_time.



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

def start_time
  @start_time
end

#test_dataObject (readonly)

Returns the value of attribute test_data.



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

def test_data
  @test_data
end

#test_data_labelObject (readonly)

Returns the value of attribute test_data_label.



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

def test_data_label
  @test_data_label
end

Instance Method Details

#assign_test_data(label, data) ⇒ Object



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

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

#have_test_data?Boolean

Returns:

  • (Boolean)


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

def have_test_data?
  not @test_data_label.nil?
end

#interruptedObject



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

def interrupted
  @interrupted = true
end

#interrupted?Boolean

Returns:

  • (Boolean)


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

def interrupted?
  @interrupted
end

#passed?Boolean

Returns:

  • (Boolean)


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

def passed?
  @passed
end

#problem_occurredObject



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

def problem_occurred
  @passed = false
end

#test_finishedObject



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

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

#test_startedObject



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

def test_started
  @start_time = Time.now
end