El sáb, 29 de dic de 2007, a las 02:00:25 -0500, Andrew WC Brown dijo:
> I was looking over some of my specs.
> I was thinking that the following:
>
> @game.should_receive(:name).and_return('The Battle for Blaze')
> @game.should_receive(:people).and_return(5000000)
> @game.should_receive(:activated).and_return(true)
>
> Would it look cleaner if I could do this instead?
>
> @game.should_recieve_and_return(
> :name => 'The Battle for Blaze'
> :people => 5000000
> :activated => true)
>
> Opinions?
Hi Andrew, I think the first option is more clearer and more expresive
than then 2nd. one.
> _______________________________________________
> rspec-users mailing list
> [email protected]
> http://rubyforge.org/mailman/listinfo/rspec-users
--
Gastón Ramos
"I always thought Smalltalk would beat Java, I just didn't know it would be
called 'Ruby' when it did."
-- Kent Beck
GNU/Linux Counter user #450312
http://gastonramos.wordpress.com/
No a la Matricula Obligatoria
http://noalamatricula.wordpress.com/about/
_______________________________________________
rspec-users mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/rspec-users