Class: Test::Unit::TestCase::InternalData
- Inherits:
-
Object
- Object
- Test::Unit::TestCase::InternalData
- Defined in:
- lib/test/unit/testcase.rb
Instance Attribute Summary collapse
-
#elapsed_time ⇒ Object
readonly
Returns the value of attribute elapsed_time.
-
#start_time ⇒ Object
readonly
Returns the value of attribute start_time.
-
#test_data ⇒ Object
readonly
Returns the value of attribute test_data.
-
#test_data_label ⇒ Object
readonly
Returns the value of attribute test_data_label.
Instance Method Summary collapse
- #assign_test_data(label, data) ⇒ Object
- #have_test_data? ⇒ Boolean
-
#initialize ⇒ InternalData
constructor
A new instance of InternalData.
- #interrupted ⇒ Object
- #interrupted? ⇒ Boolean
- #passed? ⇒ Boolean
- #problem_occurred ⇒ Object
- #test_finished ⇒ Object
- #test_started ⇒ Object
Constructor Details
#initialize ⇒ InternalData
Returns a new instance of InternalData.
720 721 722 723 724 725 726 727 |
# File 'lib/test/unit/testcase.rb', line 720 def initialize @start_time = nil @elapsed_time = nil @passed = true @interrupted = false @test_data_label = nil @test_data = nil end |
Instance Attribute Details
#elapsed_time ⇒ Object (readonly)
Returns the value of attribute elapsed_time.
718 719 720 |
# File 'lib/test/unit/testcase.rb', line 718 def elapsed_time @elapsed_time end |
#start_time ⇒ Object (readonly)
Returns the value of attribute start_time.
718 719 720 |
# File 'lib/test/unit/testcase.rb', line 718 def start_time @start_time end |
#test_data ⇒ Object (readonly)
Returns the value of attribute test_data.
719 720 721 |
# File 'lib/test/unit/testcase.rb', line 719 def test_data @test_data end |
#test_data_label ⇒ Object (readonly)
Returns the value of attribute test_data_label.
719 720 721 |
# File 'lib/test/unit/testcase.rb', line 719 def test_data_label @test_data_label end |
Instance Method Details
#assign_test_data(label, data) ⇒ Object
737 738 739 740 |
# File 'lib/test/unit/testcase.rb', line 737 def assign_test_data(label, data) @test_data_label = label @test_data = data end |
#have_test_data? ⇒ Boolean
742 743 744 |
# File 'lib/test/unit/testcase.rb', line 742 def have_test_data? not @test_data_label.nil? end |
#interrupted ⇒ Object
758 759 760 |
# File 'lib/test/unit/testcase.rb', line 758 def interrupted @interrupted = true end |
#interrupted? ⇒ Boolean
733 734 735 |
# File 'lib/test/unit/testcase.rb', line 733 def interrupted? @interrupted end |
#passed? ⇒ Boolean
729 730 731 |
# File 'lib/test/unit/testcase.rb', line 729 def passed? @passed end |
#problem_occurred ⇒ Object
754 755 756 |
# File 'lib/test/unit/testcase.rb', line 754 def problem_occurred @passed = false end |
#test_finished ⇒ Object
750 751 752 |
# File 'lib/test/unit/testcase.rb', line 750 def test_finished @elapsed_time = Time.now - @start_time end |
#test_started ⇒ Object
746 747 748 |
# File 'lib/test/unit/testcase.rb', line 746 def test_started @start_time = Time.now end |