method

execute_in_class_hierarchy

Importance_0
1.1.4 - Show latest stable - 0 notes - Class: Spec::Example::ExampleGroupMethods
execute_in_class_hierarchy(superclass_last=false) private

No documentation

This method has no description. You can help the RSpec community by adding new notes.

Hide source
# File lib/spec/example/example_group_methods.rb, line 350
      def execute_in_class_hierarchy(superclass_last=false)
        classes = []
        current_class = self
        while is_example_group?(current_class)
          superclass_last ? classes << current_class : classes.unshift(current_class)
          current_class = current_class.superclass
        end
        superclass_last ? classes << ExampleMethods : classes.unshift(ExampleMethods)

        classes.each do |example_group|
          yield example_group
        end
      end
Register or log in to add new notes.