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.



738
739
740
741
742
743
744
745
# File 'lib/test/unit/testcase.rb', line 738

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.



736
737
738
# File 'lib/test/unit/testcase.rb', line 736

def elapsed_time
  @elapsed_time
end

#start_timeObject (readonly)

Returns the value of attribute start_time.



736
737
738
# File 'lib/test/unit/testcase.rb', line 736

def start_time
  @start_time
end

#test_dataObject (readonly)

Returns the value of attribute test_data.



737
738
739
# File 'lib/test/unit/testcase.rb', line 737

def test_data
  @test_data
end

#test_data_labelObject (readonly)

Returns the value of attribute test_data_label.



737
738
739
# File 'lib/test/unit/testcase.rb', line 737

def test_data_label
  @test_data_label
end

Instance Method Details

#assign_test_data(label, data) ⇒ Object



755
756
757
758
# File 'lib/test/unit/testcase.rb', line 755

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

#have_test_data?Boolean

Returns:

  • (Boolean)


760
761
762
# File 'lib/test/unit/testcase.rb', line 760

def have_test_data?
  not @test_data_label.nil?
end

#interruptedObject



776
777
778
# File 'lib/test/unit/testcase.rb', line 776

def interrupted
  @interrupted = true
end

#interrupted?Boolean

Returns:

  • (Boolean)


751
752
753
# File 'lib/test/unit/testcase.rb', line 751

def interrupted?
  @interrupted
end

#passed?Boolean

Returns:

  • (Boolean)


747
748
749
# File 'lib/test/unit/testcase.rb', line 747

def passed?
  @passed
end

#problem_occurredObject



772
773
774
# File 'lib/test/unit/testcase.rb', line 772

def problem_occurred
  @passed = false
end

#test_finishedObject



768
769
770
# File 'lib/test/unit/testcase.rb', line 768

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

#test_startedObject



764
765
766
# File 'lib/test/unit/testcase.rb', line 764

def test_started
  @start_time = Time.now
end