David
Thanks!
Actually, match_unless_raises is probably the best solution for your
issue.
Then I found this page:
”Upgrade to 1.3.0 - Matcher DSL"
Upgrade.rdoc at master from dchelimsky's rspec - GitHub
http://github.com/dchelimsky/rspec/blob/master/Upgrade.rdoc
and, I found the tentativ
On Nov 25, 2010, at 7:16 PM, Kaoru Kobo wrote:
> Then I found this page:
>
> ”Upgrade to 1.3.0 - Matcher DSL"
> Upgrade.rdoc at master from dchelimsky's rspec - GitHub
> http://github.com/dchelimsky/rspec/blob/master/Upgrade.rdoc
>
>
> and, I found the tentative solution:
> (Is there the better
Then I found this page:
”Upgrade to 1.3.0 - Matcher DSL"
Upgrade.rdoc at master from dchelimsky's rspec - GitHub
http://github.com/dchelimsky/rspec/blob/master/Upgrade.rdoc
and, I found the tentative solution:
(Is there the better way?)
=
Thanks, David.
This should work:
...
match do |block|
(block.call; true) rescue false
end
I tried that, but the spec still fails...
1)
'The expectation failure in block called from the custom matcher
should be reported.' FAILED
expected no Exception with message matching /be_done failed/,
On Nov 24, 2010, at 11:09 PM, 白井 薫 wrote:
> I have a question about the custom matcher using Matcher#define.
>
> My intention is given by the following code:
>
>
> Spec::Matchers.define :be_done do
> match do |block|
>
I have a question about the custom matcher using Matcher#define.
My intention is given by the following code:
Spec::Matchers.define :be_done do
match do |block|
block.call
true
end
failure_message_for_should