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.
557 558 559 560 561 562 563 564 |
# File 'lib/test/unit/testcase.rb', line 557 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.
555 556 557 |
# File 'lib/test/unit/testcase.rb', line 555 def elapsed_time @elapsed_time end |
#start_time ⇒ Object (readonly)
Returns the value of attribute start_time.
555 556 557 |
# File 'lib/test/unit/testcase.rb', line 555 def start_time @start_time end |
#test_data ⇒ Object (readonly)
Returns the value of attribute test_data.
556 557 558 |
# File 'lib/test/unit/testcase.rb', line 556 def test_data @test_data end |
#test_data_label ⇒ Object (readonly)
Returns the value of attribute test_data_label.
556 557 558 |
# File 'lib/test/unit/testcase.rb', line 556 def test_data_label @test_data_label end |
Instance Method Details
#assign_test_data(label, data) ⇒ Object
574 575 576 577 |
# File 'lib/test/unit/testcase.rb', line 574 def assign_test_data(label, data) @test_data_label = label @test_data = data end |
#have_test_data? ⇒ Boolean
579 580 581 |
# File 'lib/test/unit/testcase.rb', line 579 def have_test_data? not @test_data_label.nil? end |
#interrupted ⇒ Object
595 596 597 |
# File 'lib/test/unit/testcase.rb', line 595 def interrupted @interrupted = true end |
#interrupted? ⇒ Boolean
570 571 572 |
# File 'lib/test/unit/testcase.rb', line 570 def interrupted? @interrupted end |
#passed? ⇒ Boolean
566 567 568 |
# File 'lib/test/unit/testcase.rb', line 566 def passed? @passed end |
#problem_occurred ⇒ Object
591 592 593 |
# File 'lib/test/unit/testcase.rb', line 591 def problem_occurred @passed = false end |
#test_finished ⇒ Object
587 588 589 |
# File 'lib/test/unit/testcase.rb', line 587 def test_finished @elapsed_time = Time.now - @start_time end |
#test_started ⇒ Object
583 584 585 |
# File 'lib/test/unit/testcase.rb', line 583 def test_started @start_time = Time.now end |