Class: RSpock::AST::TestMethodDstrTransformation

Inherits:
ASTTransform::AbstractTransformation
  • Object
show all
Defined in:
lib/rspock/ast/test_method_dstr_transformation.rb

Constant Summary collapse

TEST_INDEX_AST =
s(:begin,
s(:lvar, :_test_index_))
LINE_NUMBER_AST =
s(:begin,
s(:lvar, :_line_number_))
SPACE_STR_AST =
s(:str, " ")
LINE_NUMBER_STR_AST =
s(:str, " line ")

Instance Method Summary collapse

Instance Method Details

#on_dstr(node) ⇒ Object



17
18
19
20
# File 'lib/rspock/ast/test_method_dstr_transformation.rb', line 17

def on_dstr(node)
  children = [*process_all(node), SPACE_STR_AST, TEST_INDEX_AST, LINE_NUMBER_STR_AST, LINE_NUMBER_AST]
  node.updated(nil, children)
end