Class: Tryouts::Testrun

Inherits:
Data
  • Object
show all
Defined in:
lib/tryouts/test_case.rb

Overview

test_cases is a single ordered array of TestCase | OrphanBlock — the interleaving order is load-bearing for shared-context local-variable state.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#metadataObject (readonly)

Returns the value of attribute metadata

Returns:

  • (Object)

    the current value of metadata



118
119
120
# File 'lib/tryouts/test_case.rb', line 118

def 
  @metadata
end

#setupObject (readonly)

Returns the value of attribute setup

Returns:

  • (Object)

    the current value of setup



118
119
120
# File 'lib/tryouts/test_case.rb', line 118

def setup
  @setup
end

#source_fileObject (readonly)

Returns the value of attribute source_file

Returns:

  • (Object)

    the current value of source_file



118
119
120
# File 'lib/tryouts/test_case.rb', line 118

def source_file
  @source_file
end

#teardownObject (readonly)

Returns the value of attribute teardown

Returns:

  • (Object)

    the current value of teardown



118
119
120
# File 'lib/tryouts/test_case.rb', line 118

def teardown
  @teardown
end

#test_casesObject (readonly)

Returns the value of attribute test_cases

Returns:

  • (Object)

    the current value of test_cases



118
119
120
# File 'lib/tryouts/test_case.rb', line 118

def test_cases
  @test_cases
end

#warningsObject (readonly)

Returns the value of attribute warnings

Returns:

  • (Object)

    the current value of warnings



118
119
120
# File 'lib/tryouts/test_case.rb', line 118

def warnings
  @warnings
end

Instance Method Details

#empty?Boolean

Returns:

  • (Boolean)


123
124
125
# File 'lib/tryouts/test_case.rb', line 123

def empty?
  total_tests.zero?
end

#total_testsObject



119
120
121
# File 'lib/tryouts/test_case.rb', line 119

def total_tests
  test_cases.count { |tc| tc.is_a?(TestCase) }
end