[rspec-users] Question: Define custom matcher like raise_error, by Matchers.define
pub at kaorukobo.net
Thu Nov 25 19:30:22 EST 2010
> This should work:
> match do |block|
> (block.call; true) rescue false
I tried that, but the spec still fails...
'The expectation failure in block called from the custom matcher
should be reported.' FAILED
expected no Exception with message matching /be_done failed/, got
#<Spec::Expectations::ExpectationNotMetError: be_done failed.>
I expect that it fails with message 'expected: 2, got: 1 (using ==)'.
More information about the rspec-users