module TestBench::Assert::Proc::Assertions
Public Instance Methods
raises_error?(error_type=nil)
click to toggle source
# File lib/test_bench/assert/proc.rb, line 5 def raises_error? error_type=nil rescue_error_type = error_type || StandardError self.call return false rescue rescue_error_type => error if error_type.nil? or error.instance_of? rescue_error_type return true end raise error end