Module: ConfidenceCheck::CheckMethod
- Included in:
- ForMinitest, ForMinitest::WithCapybara, ForRSpec, ForRSpec::WithCapybara
- Defined in:
- lib/confidence_check/check_method.rb
Instance Method Summary collapse
Instance Method Details
#confidence_check(context = nil, &block) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/confidence_check/check_method.rb', line 5 def confidence_check(context=nil, &block) if block.nil? raise "#confidence_check requires a block" end block.() rescue Exception => ex $stdout.puts context.inspect if context if exception_klasses.any? {|_| ex.kind_of?(_) } raise ConfidenceCheckedFailed.new(ex) else raise end end |