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.



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

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.



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

def elapsed_time
  @elapsed_time
end

#start_timeObject (readonly)

Returns the value of attribute start_time.



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

def start_time
  @start_time
end

#test_dataObject (readonly)

Returns the value of attribute test_data.



713
714
715
# File 'lib/test/unit/testcase.rb', line 713

def test_data
  @test_data
end

#test_data_labelObject (readonly)

Returns the value of attribute test_data_label.



713
714
715
# File 'lib/test/unit/testcase.rb', line 713

def test_data_label
  @test_data_label
end

Instance Method Details

#assign_test_data(label, data) ⇒ Object



731
732
733
734
# File 'lib/test/unit/testcase.rb', line 731

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

#have_test_data?Boolean

Returns:

  • (Boolean)


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

def have_test_data?
  not @test_data_label.nil?
end

#interruptedObject



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

def interrupted
  @interrupted = true
end

#interrupted?Boolean

Returns:

  • (Boolean)


727
728
729
# File 'lib/test/unit/testcase.rb', line 727

def interrupted?
  @interrupted
end

#passed?Boolean

Returns:

  • (Boolean)


723
724
725
# File 'lib/test/unit/testcase.rb', line 723

def passed?
  @passed
end

#problem_occurredObject



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

def problem_occurred
  @passed = false
end

#test_finishedObject



744
745
746
# File 'lib/test/unit/testcase.rb', line 744

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

#test_startedObject



740
741
742
# File 'lib/test/unit/testcase.rb', line 740

def test_started
  @start_time = Time.now
end