Michael Neumann wrote:
> On Sat, Jun 05, 2004 at 03:34:47AM +0900, Edgardo Hames wrote:
> 
>>Hi, everybody. I would like to use an assert like function to test the 
>>number of rows returned by a query. Something like Eiffel's
>>
>>check result.num_rows = 1
>>
>>What's the best way to do that in Ruby?
> 
> 
>   def check
>     raise "check failed" unless yield
>   end
> 
> 
>   check { result.num_rows == 1 }
> 

Awesome! I love Ruby!


-- 
Edgardo Hames
Consultor InformßŇico
Vates S.A. Ingenier¨┬ de Software

ehames / vates.com
Tel: +54 +351 +5709800/01/02 int. 121
Av. Col 778 - 4í╝ piso. Cˇ˛doba