class Rspec::Core::Example
def run(behaviour_instance)
def run(behaviour_instance) @behaviour_instance = behaviour_instance @behaviour_instance.running_example = self run_started all_systems_nominal = true exception_encountered = nil begin run_before_each @behaviour_instance.instance_eval(&example_block) if example_block rescue Exception => e exception_encountered = e all_systems_nominal = false end begin run_after_each rescue Exception => e exception_encountered ||= e all_systems_nominal = false ensure @behaviour_instance.running_example = nil end if exception_encountered run_failed(exception_encountered) else example_block ? run_passed : run_pending end all_systems_nominal end