Method: Spec::Example::ExampleMethods#eval_each_fail_slow

Defined in:
lib/spec/example/example_methods.rb

#eval_each_fail_slow(blocks) ⇒ Object

:nodoc:



77
78
79
80
81
82
83
84
85
86
87
# File 'lib/spec/example/example_methods.rb', line 77

def eval_each_fail_slow(blocks) # :nodoc:
  first_exception = nil
  blocks.each do |block|
    begin
      instance_eval(&block)
    rescue Exception => e
      first_exception ||= e
    end
  end
  raise first_exception if first_exception
end