Class: RSpock::AST::ExpectBlock
- Defined in:
- lib/rspock/ast/expect_block.rb
Instance Attribute Summary
Attributes inherited from Block
Instance Method Summary collapse
- #children ⇒ Object
-
#initialize(node) ⇒ ExpectBlock
constructor
A new instance of ExpectBlock.
- #successors ⇒ Object
Methods inherited from Block
#<<, #node_container=, #node_container?, #range, #succession_error_msg, #unshift, #valid_successor?
Constructor Details
#initialize(node) ⇒ ExpectBlock
Returns a new instance of ExpectBlock.
8 9 10 |
# File 'lib/rspock/ast/expect_block.rb', line 8 def initialize(node) super(:Expect, node) end |
Instance Method Details
#children ⇒ Object
16 17 18 |
# File 'lib/rspock/ast/expect_block.rb', line 16 def children super.map { |child| ComparisonToAssertionTransformation.new(:_test_index_, :_line_number_).run(child) } end |
#successors ⇒ Object
12 13 14 |
# File 'lib/rspock/ast/expect_block.rb', line 12 def successors @successors ||= [:Cleanup, :Where, :End].freeze end |