On Fri, 9 Nov 2001, Robert Feldt wrote:

Sorry for not knowing this. But could someone please explain
what the => notation does here

>     rescue Exception => e

Thanks
>
> I didn't find a way in RubyUnit to check both an exception and its error
> message. Maybe its there somewhere. If not here's one version:
>
>   def assert_exception_and_message(exception, eMessage, message = "")
>     exception_raised = true
>     begin
>       yield
>       exception_raised = false
>     rescue Exception => e
>       raise e unless exception === e
>       assert_equals(eMessage, e.message)
>     end
>     assert(exception_raised, message)
>   end
>
> Its not perfect but can easily be fixed. If something similar is not in
> Lapidary I'd propose its added to the merged Test::Unit.
>
> Regards,
>
> Robert
>
>


=========================================================
Jim Freeze
jim / freeze.org
---------------------------------------------------------
No comment at this time.
http://www.freeze.org
=========================================================