method
matches?
1.1.4 -
Show latest stable
- Class:
Spec::Matchers::ThrowSymbol
matches?(proc)public
No documentation available.
# File lib/spec/matchers/throw_symbol.rb, line 10
def matches?(proc)
begin
proc.call
rescue NameError => e
raise e unless e.message =~ /uncaught throw/
@actual = e.name.to_sym
ensure
if @expected.nil?
return @actual.nil? ? false : true
else
return @actual == @expected
end
end
end