Class: Test::Unit::TestCase::InternalData
Relationships & Source Files | |
Inherits: | Object |
Defined in: | lib/test/unit/testcase.rb |
Class Method Summary
- .new ⇒ InternalData constructor
Instance Attribute Summary
- #elapsed_time readonly
- #have_test_data? ⇒ Boolean readonly
- #interrupted? ⇒ Boolean readonly
- #passed? ⇒ Boolean readonly
- #run_context rw
- #start_time readonly
- #test_data readonly
- #test_data_label readonly
Instance Method Summary
Constructor Details
.new ⇒ InternalData
# 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 (readonly)
[ GitHub ]# File 'lib/test/unit/testcase.rb', line 927
attr_reader :start_time, :elapsed_time
#have_test_data? ⇒ Boolean
(readonly)
[ GitHub ]
# File 'lib/test/unit/testcase.rb', line 953
def have_test_data? not @test_data_label.nil? end
#interrupted? ⇒ Boolean
(readonly)
[ GitHub ]
# File 'lib/test/unit/testcase.rb', line 944
def interrupted? @interrupted end
#passed? ⇒ Boolean
(readonly)
[ GitHub ]
# File 'lib/test/unit/testcase.rb', line 940
def passed? @passed end
#run_context (rw)
[ GitHub ]# File 'lib/test/unit/testcase.rb', line 929
attr_accessor :run_context
#start_time (readonly)
[ GitHub ]# File 'lib/test/unit/testcase.rb', line 927
attr_reader :start_time, :elapsed_time
#test_data (readonly)
[ GitHub ]# File 'lib/test/unit/testcase.rb', line 928
attr_reader :test_data_label, :test_data
#test_data_label (readonly)
[ GitHub ]# File 'lib/test/unit/testcase.rb', line 928
attr_reader :test_data_label, :test_data
Instance Method Details
#assign_test_data(label, data)
[ GitHub ]#interrupted (readonly)
[ GitHub ]# File 'lib/test/unit/testcase.rb', line 969
def interrupted @interrupted = true end
#problem_occurred
[ GitHub ]# File 'lib/test/unit/testcase.rb', line 965
def problem_occurred @passed = false end
#test_finished
[ GitHub ]# File 'lib/test/unit/testcase.rb', line 961
def test_finished @elapsed_time = Time.now - @start_time end
#test_started
[ GitHub ]# File 'lib/test/unit/testcase.rb', line 957
def test_started @start_time = Time.now end