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.



712
713
714
715
716
717
718
719
# File 'lib/test/unit/testcase.rb', line 712

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.



710
711
712
# File 'lib/test/unit/testcase.rb', line 710

def elapsed_time
  @elapsed_time
end

#start_timeObject (readonly)

Returns the value of attribute start_time.



710
711
712
# File 'lib/test/unit/testcase.rb', line 710

def start_time
  @start_time
end

#test_dataObject (readonly)

Returns the value of attribute test_data.



711
712
713
# File 'lib/test/unit/testcase.rb', line 711

def test_data
  @test_data
end

#test_data_labelObject (readonly)

Returns the value of attribute test_data_label.



711
712
713
# File 'lib/test/unit/testcase.rb', line 711

def test_data_label
  @test_data_label
end

Instance Method Details

#assign_test_data(label, data) ⇒ Object



729
730
731
732
# File 'lib/test/unit/testcase.rb', line 729

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

#have_test_data?Boolean

Returns:

  • (Boolean)


734
735
736
# File 'lib/test/unit/testcase.rb', line 734

def have_test_data?
  not @test_data_label.nil?
end

#interruptedObject



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

def interrupted
  @interrupted = true
end

#interrupted?Boolean

Returns:

  • (Boolean)


725
726
727
# File 'lib/test/unit/testcase.rb', line 725

def interrupted?
  @interrupted
end

#passed?Boolean

Returns:

  • (Boolean)


721
722
723
# File 'lib/test/unit/testcase.rb', line 721

def passed?
  @passed
end

#problem_occurredObject



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

def problem_occurred
  @passed = false
end

#test_finishedObject



742
743
744
# File 'lib/test/unit/testcase.rb', line 742

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

#test_startedObject



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

def test_started
  @start_time = Time.now
end