Sha256: 30f4650e30f92f026ed4b12d087f070a5888717687940ccf1703c3de8c89e787

Contents?: true

Size: 625 Bytes

Versions: 1

Compression:

Stored size: 625 Bytes

Contents

def assert_assigns_expression(node_type, value, tree)
  assert_kind_of Block, tree
  assert_kind_of Statement, tree.elements.last
  assert_kind_of Assignment, tree.elements.last.elements.last
  assert_kind_of Identifier, tree.elements.last.elements.last.elements[0]
  assert_kind_of AssignmentOperator, tree.elements.last.elements.last.elements[1]
  assert_kind_of Expression, tree.elements.last.elements.last.elements[2]
  assert_kind_of node_type, tree.elements.last.elements.last.elements[2].elements.first
  assert_equal value, tree.elements.last.elements.last.elements[2].elements.first.text_value unless(value.nil?)
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
koi-reference-parser-0.0.3 test/helpers/assert_assigns_expression.rb