Class: Tryouts::OrphanBlock

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

Overview

Code with no description and no expectations that sits between test cases. Executed in source order for its side effects, but never evaluated against expectations and never counted in test tallies.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from EvalAnchor

#eval_start_line

Constructor Details

#initialize(first_code_line: nil, **rest) ⇒ OrphanBlock

Returns a new instance of OrphanBlock.



95
96
97
# File 'lib/tryouts/test_case.rb', line 95

def initialize(first_code_line: nil, **rest)
  super
end

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code

Returns:

  • (Object)

    the current value of code



92
93
94
# File 'lib/tryouts/test_case.rb', line 92

def code
  @code
end

#first_code_lineObject (readonly)

Returns the value of attribute first_code_line

Returns:

  • (Object)

    the current value of first_code_line



92
93
94
# File 'lib/tryouts/test_case.rb', line 92

def first_code_line
  @first_code_line
end

#line_rangeObject (readonly)

Returns the value of attribute line_range

Returns:

  • (Object)

    the current value of line_range



92
93
94
# File 'lib/tryouts/test_case.rb', line 92

def line_range
  @line_range
end

#pathObject (readonly)

Returns the value of attribute path

Returns:

  • (Object)

    the current value of path



92
93
94
# File 'lib/tryouts/test_case.rb', line 92

def path
  @path
end

Instance Method Details

#empty?Boolean

Returns:

  • (Boolean)


99
100
101
# File 'lib/tryouts/test_case.rb', line 99

def empty?
  code.empty?
end