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 way?)

Actually, match_unless_raises is probably the best solution for your issue.

> 
> ========================================================================
> Spec::Matchers.define :be_done do
> -  match do |block|
> +  # Do not turn any exceptions to false.
> +  match_unless_raises(Class.new(Exception)) do |block|
>     block.call
>     true
>   end
> ========================================================================
> 
> Best Regards.
> --
> Kaoru Kobo

_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to