Class: Test::Unit::TestCase::InternalData
- Inherits:
-
Object
- Object
- Test::Unit::TestCase::InternalData
- Defined in:
- lib/test/unit/testcase.rb,
lib/test/unit/testcase.rb,
lib/test/unit/testcase.rb,
lib/test/unit/testcase.rb,
lib/test/unit/testcase.rb,
lib/test/unit/testcase.rb,
lib/test/unit/testcase.rb,
lib/test/unit/testcase.rb
Instance Attribute Summary collapse
-
#elapsed_time ⇒ Object
readonly
Returns the value of attribute elapsed_time.
-
#run_context ⇒ Object
Returns the value of attribute run_context.
-
#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.
-
#worker_id ⇒ Object
Returns the value of attribute worker_id.
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
-
#marshal_dump ⇒ Object
-
#marshal_load(data) ⇒ Object
-
#passed? ⇒ Boolean
-
#problem_occurred ⇒ Object
-
#test_finished ⇒ Object
-
#test_started ⇒ Object
Constructor Details
#initialize ⇒ InternalData
Returns a new instance of InternalData.
808 809 810 811 812 813 814 815 |
# File 'lib/test/unit/testcase.rb', line 808 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
806 807 808 |
# File 'lib/test/unit/testcase.rb', line 806 def elapsed_time @elapsed_time end |
#run_context ⇒ Object
Returns the value of attribute run_context.
925 926 927 |
# File 'lib/test/unit/testcase.rb', line 925 def run_context @run_context end |
#start_time ⇒ Object (readonly)
Returns the value of attribute start_time
806 807 808 |
# File 'lib/test/unit/testcase.rb', line 806 def start_time @start_time end |
#test_data ⇒ Object (readonly)
Returns the value of attribute test_data
807 808 809 |
# File 'lib/test/unit/testcase.rb', line 807 def test_data @test_data end |
#test_data_label ⇒ Object (readonly)
Returns the value of attribute test_data_label
807 808 809 |
# File 'lib/test/unit/testcase.rb', line 807 def test_data_label @test_data_label end |
#worker_id ⇒ Object
Returns the value of attribute worker_id.
989 990 991 |
# File 'lib/test/unit/testcase.rb', line 989 def worker_id @worker_id end |
Instance Method Details
#assign_test_data(label, data) ⇒ Object
825 826 827 828 |
# File 'lib/test/unit/testcase.rb', line 825 def assign_test_data(label, data) @test_data_label = label @test_data = data end |
#have_test_data? ⇒ Boolean
830 831 832 |
# File 'lib/test/unit/testcase.rb', line 830 def have_test_data? not @test_data_label.nil? end |
#interrupted ⇒ Object
846 847 848 |
# File 'lib/test/unit/testcase.rb', line 846 def interrupted @interrupted = true end |
#interrupted? ⇒ Boolean
821 822 823 |
# File 'lib/test/unit/testcase.rb', line 821 def interrupted? @interrupted end |
#marshal_dump ⇒ Object
1034 1035 1036 1037 1038 1039 1040 1041 1042 |
# File 'lib/test/unit/testcase.rb', line 1034 def marshal_dump { start_time: @start_time, elapsed_time: @elapsed_time, passed: @passed, interrupted: @interrupted, test_data_label: @test_data_label, } end |
#marshal_load(data) ⇒ Object
1044 1045 1046 1047 1048 1049 1050 |
# File 'lib/test/unit/testcase.rb', line 1044 def marshal_load(data) @start_time = data[:start_time] @elapsed_time = data[:elapsed_time] @passed = data[:passed] @interrupted = data[:interrupted] @test_data_label = data[:test_data_label] end |
#passed? ⇒ Boolean
817 818 819 |
# File 'lib/test/unit/testcase.rb', line 817 def passed? @passed end |
#problem_occurred ⇒ Object
842 843 844 |
# File 'lib/test/unit/testcase.rb', line 842 def problem_occurred @passed = false end |
#test_finished ⇒ Object
838 839 840 |
# File 'lib/test/unit/testcase.rb', line 838 def test_finished @elapsed_time = Time.now - @start_time end |
#test_started ⇒ Object
834 835 836 |
# File 'lib/test/unit/testcase.rb', line 834 def test_started @start_time = Time.now end |