Class: Probatio::Leaf

Inherits:
Node
  • Object
show all
Defined in:
lib/probatio.rb

Direct Known Subclasses

After, Around, Before, Setup, Teardown, Test

Instance Attribute Summary

Attributes inherited from Node

#block, #children, #opts, #parent, #path

Instance Method Summary collapse

Methods inherited from Node

#array_name, #depth, #filename, #full_name, #groups, #head, #initialize, #last_line, #line, #location, #map, #name, #path_and_line, #pending?, #root, #skip?, #test?, #to_s, #trail, #type

Constructor Details

This class inherits a constructor from Probatio::Node

Instance Method Details

#run(run_opts) ⇒ Object



588
589
590
591
592
593
594
595
596
597
598
599
600
601
# File 'lib/probatio.rb', line 588

def run(run_opts)

  return Probatio.despatch("#{type}_excluded", self) \
    if exclude?(run_opts)

  return Probatio.despatch("#{type}_pending", self) \
    if @opts[:pending]

  Probatio.despatch("#{type}_enter", self)

  @parent.instance_eval(&@block)

  Probatio.despatch("#{type}_leave", self)
end