Re: [rspec-users] Mocking a non-existent method

2007-08-17 Thread David Chelimsky
On 8/17/07, Scott Taylor <[EMAIL PROTECTED]> wrote: > > On Aug 17, 2007, at 2:59 AM, David Chelimsky wrote: > > > On 8/16/07, Joe Van Dyk <[EMAIL PROTECTED]> wrote: > >> I don't like this: > >> > >> i = mock(Integer) > >> i.should_receive(:asdfasdf).and_return('foo') > >> puts i.asdfasd

Re: [rspec-users] Mocking a non-existent method

2007-08-17 Thread Scott Taylor
On Aug 17, 2007, at 2:59 AM, David Chelimsky wrote: > On 8/16/07, Joe Van Dyk <[EMAIL PROTECTED]> wrote: >> I don't like this: >> >> i = mock(Integer) >> i.should_receive(:asdfasdf).and_return('foo') >> puts i.asdfasdf >> >> >> Shouldn't rspec check to see that :asdfasdf is a valid me

Re: [rspec-users] Mocking a non-existent method

2007-08-17 Thread David Chelimsky
On 8/16/07, Joe Van Dyk <[EMAIL PROTECTED]> wrote: > I don't like this: > > i = mock(Integer) > i.should_receive(:asdfasdf).and_return('foo') > puts i.asdfasdf > > > Shouldn't rspec check to see that :asdfasdf is a valid message to be > sending Integer? Put simply: no. That's what inte

[rspec-users] Mocking a non-existent method

2007-08-16 Thread Joe Van Dyk
I don't like this: i = mock(Integer) i.should_receive(:asdfasdf).and_return('foo') puts i.asdfasdf Shouldn't rspec check to see that :asdfasdf is a valid message to be sending Integer? Joe ___ rspec-users mailing list rspec-users@rubyforge