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.



781
782
783
784
785
786
787
788
# File 'lib/test/unit/testcase.rb', line 781

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.



779
780
781
# File 'lib/test/unit/testcase.rb', line 779

def elapsed_time
  @elapsed_time
end

#start_timeObject (readonly)

Returns the value of attribute start_time.



779
780
781
# File 'lib/test/unit/testcase.rb', line 779

def start_time
  @start_time
end

#test_dataObject (readonly)

Returns the value of attribute test_data.



780
781
782
# File 'lib/test/unit/testcase.rb', line 780

def test_data
  @test_data
end

#test_data_labelObject (readonly)

Returns the value of attribute test_data_label.



780
781
782
# File 'lib/test/unit/testcase.rb', line 780

def test_data_label
  @test_data_label
end

Instance Method Details

#assign_test_data(label, data) ⇒ Object



798
799
800
801
# File 'lib/test/unit/testcase.rb', line 798

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

#have_test_data?Boolean

Returns:

  • (Boolean)


803
804
805
# File 'lib/test/unit/testcase.rb', line 803

def have_test_data?
  not @test_data_label.nil?
end

#interruptedObject



819
820
821
# File 'lib/test/unit/testcase.rb', line 819

def interrupted
  @interrupted = true
end

#interrupted?Boolean

Returns:

  • (Boolean)


794
795
796
# File 'lib/test/unit/testcase.rb', line 794

def interrupted?
  @interrupted
end

#passed?Boolean

Returns:

  • (Boolean)


790
791
792
# File 'lib/test/unit/testcase.rb', line 790

def passed?
  @passed
end

#problem_occurredObject



815
816
817
# File 'lib/test/unit/testcase.rb', line 815

def problem_occurred
  @passed = false
end

#test_finishedObject



811
812
813
# File 'lib/test/unit/testcase.rb', line 811

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

#test_startedObject



807
808
809
# File 'lib/test/unit/testcase.rb', line 807

def test_started
  @start_time = Time.now
end