[rspec-users] Do you think it would look cleaner?

Andrew WC Brown omen.king at gmail.com
Sat Dec 29 02:00:25 EST 2007


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?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/rspec-users/attachments/20071229/9ee68a8a/attachment.html 


More information about the rspec-users mailing list