Parent

Class/Module Index [+]

Quicksearch

Spec::Example::ExampleGroupHierarchy

Public Class Methods

new(example_group_class) click to toggle source
# File lib/spec/example/example_group_hierarchy.rb, line 4
def initialize(example_group_class)
  push example_group_class
  if example_group_class.respond_to?(:superclass) && example_group_class.superclass.respond_to?(:example_group_hierarchy)
    unshift example_group_class.superclass.example_group_hierarchy
    flatten!
  end
end

Public Instance Methods

after_all_parts() click to toggle source
# File lib/spec/example/example_group_hierarchy.rb, line 40
def after_all_parts
  @after_all_parts ||= reverse.collect {|klass| klass.after_all_parts}.flatten
end
after_each_parts() click to toggle source
# File lib/spec/example/example_group_hierarchy.rb, line 36
def after_each_parts
  @after_each_parts ||= reverse.collect {|klass| klass.after_each_parts}.flatten
end
before_all_parts() click to toggle source
# File lib/spec/example/example_group_hierarchy.rb, line 28
def before_all_parts
  @before_all_parts ||= collect {|klass| klass.before_all_parts}.flatten
end
before_each_parts() click to toggle source
# File lib/spec/example/example_group_hierarchy.rb, line 32
def before_each_parts
  @before_each_parts ||= collect {|klass| klass.before_each_parts}.flatten
end
nested_description_from(example_group) click to toggle source
# File lib/spec/example/example_group_hierarchy.rb, line 48
def nested_description_from(example_group)
  example_group.description_args.join
end
nested_descriptions() click to toggle source
# File lib/spec/example/example_group_hierarchy.rb, line 44
def nested_descriptions
  @nested_descriptions ||= collect {|eg| nested_description_from(eg) == "" ? nil : nested_description_from(eg) }.compact
end
run_after_all(example) click to toggle source
# File lib/spec/example/example_group_hierarchy.rb, line 24
def run_after_all(example)
  example.eval_each_fail_slow(after_all_parts)
end
run_after_each(example) click to toggle source
# File lib/spec/example/example_group_hierarchy.rb, line 20
def run_after_each(example)
  example.eval_each_fail_slow(after_each_parts)
end
run_before_all(example) click to toggle source
# File lib/spec/example/example_group_hierarchy.rb, line 12
def run_before_all(example)
  example.eval_each_fail_fast(before_all_parts)
end
run_before_each(example) click to toggle source
# File lib/spec/example/example_group_hierarchy.rb, line 16
def run_before_each(example)
  example.eval_each_fail_fast(before_each_parts)
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.