[rspec-users] Do you think it would look cleaner?
pergesu at gmail.com
Sat Dec 29 13:29:57 EST 2007
On Dec 28, 2007 11:00 PM, Andrew WC Brown <omen.king at gmail.com> wrote:
> 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 (:activated).and_return(true)
> Would it look cleaner if I could do this instead?
> :name => 'The Battle for Blaze'
> :people => 5000000
> :activated => true)
> rspec-users mailing list
> rspec-users at rubyforge.org
Two thoughts as to why I wouldn't use this...
1. One expectation per example
2. Stub queries, expect commands
Your way is clean though. How do you handle arguments?
More information about the rspec-users