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

2008-01-03 Thread Kerry Buckley
On 2 Jan 2008, at 22:09, David Chelimsky wrote: On Jan 2, 2008 5:20 PM, Zach Dennis [EMAIL PROTECTED] wrote: RSpec doesn't enforce strict-order mocking. Sure it does, if you ask it to: http://rspec.info/documentation/mocks/message_expectations.html Am I right, though, in thinking that you

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

2008-01-03 Thread Zach Dennis
On Jan 3, 2008 12:20 PM, Kerry Buckley [EMAIL PROTECTED] wrote: On 2 Jan 2008, at 22:09, David Chelimsky wrote: On Jan 2, 2008 5:20 PM, Zach Dennis [EMAIL PROTECTED] wrote: RSpec doesn't enforce strict-order mocking. Sure it does, if you ask it to:

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

2008-01-02 Thread Zach Dennis
On Dec 30, 2007 4:47 AM, Kero van Gelder [EMAIL PROTECTED] 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(:people).and_return(500)

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

2008-01-02 Thread David Chelimsky
On Jan 2, 2008 5:20 PM, Zach Dennis [EMAIL PROTECTED] wrote: RSpec doesn't enforce strict-order mocking. Sure it does, if you ask it to: http://rspec.info/documentation/mocks/message_expectations.html ___ rspec-users mailing list

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

2008-01-02 Thread Zach Dennis
I learn something everyday. Thanks On Jan 2, 2008 5:09 PM, David Chelimsky [EMAIL PROTECTED] wrote: On Jan 2, 2008 5:20 PM, Zach Dennis [EMAIL PROTECTED] wrote: RSpec doesn't enforce strict-order mocking. Sure it does, if you ask it to:

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

2008-01-01 Thread Kero van Gelder
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(500) @game.should_receive(:activated).and_return(true) Would it look cleaner if I could do this instead?

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

2007-12-30 Thread Jean-François Trân
2007/12/29, Andrew WC Brown [EMAIL PROTECTED]: I just see these large blocks of: @shopping_list.should_receive(:milk)..and_return('milk') @shopping_list.should_receive(:bagel).and_return('bagel') @shopping_list.should_receive(:coffee).and_return('coffee') and it would be much clearer if I

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

2007-12-30 Thread David Chelimsky
On Dec 30, 2007 6:52 AM, Jean-François Trân [EMAIL PROTECTED] wrote: 2007/12/29, Andrew WC Brown [EMAIL PROTECTED]: I just see these large blocks of: @shopping_list.should_receive(:milk)..and_return('milk') @shopping_list.should_receive(:bagel).and_return('bagel')

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

2007-12-29 Thread Andrew WC Brown
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(500) @game.should_receive(:activated).and_return(true) Would it look cleaner if I could do this instead?

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

2007-12-29 Thread Pat Maddox
On Dec 28, 2007 11:00 PM, Andrew WC Brown [EMAIL PROTECTED] 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(:people).and_return(500) @game.should_receive

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

2007-12-29 Thread Andrew WC Brown
eg. I'm going to the store to buy one milk I'm going to the store to buy one bagel I'm going to the store to buy one coffee @shopping_list.should_receive(:milk).once.and_return('milk') @shopping_list.should_receive(:bagel).once.and_return('bagel')

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

2007-12-29 Thread David Chelimsky
On Dec 29, 2007 6:00 PM, Andrew WC Brown [EMAIL PROTECTED] wrote: I just see these large blocks of: @shopping_list.should_receive(:milk)..and_return('milk') @shopping_list.should_receive(:bagel).and_return('bagel') @shopping_list.should_receive(:coffee).and_return('coffee') and it would

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

2007-12-29 Thread Gaston Ramos
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(500)

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

2007-12-29 Thread Zach Dennis
On Dec 29, 2007 1:29 PM, Pat Maddox [EMAIL PROTECTED] wrote: On Dec 28, 2007 11:00 PM, Andrew WC Brown [EMAIL PROTECTED] 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')