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.
-
#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.
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.
930 931 932 933 934 935 936 937 938 |
# File 'lib/test/unit/testcase.rb', line 930 def initialize @start_time = nil @elapsed_time = nil @passed = true @interrupted = false @test_data_label = nil @test_data = nil @run_context = nil end |
Instance Attribute Details
#elapsed_time ⇒ Object (readonly)
Returns the value of attribute elapsed_time.
927 928 929 |
# File 'lib/test/unit/testcase.rb', line 927 def elapsed_time @elapsed_time end |
#run_context ⇒ Object
Returns the value of attribute run_context.
929 930 931 |
# File 'lib/test/unit/testcase.rb', line 929 def run_context @run_context end |
#start_time ⇒ Object (readonly)
Returns the value of attribute start_time.
927 928 929 |
# File 'lib/test/unit/testcase.rb', line 927 def start_time @start_time end |
#test_data ⇒ Object (readonly)
Returns the value of attribute test_data.
928 929 930 |
# File 'lib/test/unit/testcase.rb', line 928 def test_data @test_data end |
#test_data_label ⇒ Object (readonly)
Returns the value of attribute test_data_label.
928 929 930 |
# File 'lib/test/unit/testcase.rb', line 928 def test_data_label @test_data_label end |
Instance Method Details
#assign_test_data(label, data) ⇒ Object
948 949 950 951 |
# File 'lib/test/unit/testcase.rb', line 948 def assign_test_data(label, data) @test_data_label = label @test_data = data end |
#have_test_data? ⇒ Boolean
953 954 955 |
# File 'lib/test/unit/testcase.rb', line 953 def have_test_data? not @test_data_label.nil? end |
#interrupted ⇒ Object
969 970 971 |
# File 'lib/test/unit/testcase.rb', line 969 def interrupted @interrupted = true end |
#interrupted? ⇒ Boolean
944 945 946 |
# File 'lib/test/unit/testcase.rb', line 944 def interrupted? @interrupted end |
#passed? ⇒ Boolean
940 941 942 |
# File 'lib/test/unit/testcase.rb', line 940 def passed? @passed end |
#problem_occurred ⇒ Object
965 966 967 |
# File 'lib/test/unit/testcase.rb', line 965 def problem_occurred @passed = false end |
#test_finished ⇒ Object
961 962 963 |
# File 'lib/test/unit/testcase.rb', line 961 def test_finished @elapsed_time = Time.now - @start_time end |
#test_started ⇒ Object
957 958 959 |
# File 'lib/test/unit/testcase.rb', line 957 def test_started @start_time = Time.now end |