Module: Waterpig::SaveAndOpenOnFail

Defined in:
lib/waterpig/save-and-open-on-fail.rb

Instance Method Summary collapse

Instance Method Details

#instance_eval(&block) ⇒ Object


3
4
5
6
7
8
9
10
11
12
13
14
15
# File 'lib/waterpig/save-and-open-on-fail.rb', line 3

def instance_eval(&block)
  super(&block)
rescue RSpec::Core::Pending::PendingDeclaredInExample
  raise
rescue Object => ex
  begin
    wrapper = ex.exception("#{ex.message}\nLast view at: file://#{save_page}")
    wrapper.set_backtrace(ex.backtrace)
    raise wrapper
  rescue
    raise ex
  end
end