Re: [rspec-users] and_raise with a message

2012-08-22 Thread Bas Vodde
Hola, I went ahead and wrote some code instead of emails and implemented it and send a pull request. The way I implemented was just pretty simple: - and_raise has a second parameter which is an empty string by default - when raise_exception is called and the exception passed is a Class, then i

Re: [rspec-users] How do I specify that a class does not receive any message

2012-08-22 Thread Lenny Marks
On Aug 22, 2012, at 1:38 PM, Lenny Marks wrote: > > On Aug 22, 2012, at 10:36 AM, David Chelimsky wrote: > >> On Wed, Aug 22, 2012 at 9:16 AM, J. B. Rainsberger wrote: >>> On Wed, Aug 22, 2012 at 10:07 AM, David Chelimsky >>> wrote: On Wed, Aug 22, 2012 at 7:52 AM, J. B. Rainsberge

Re: [rspec-users] How do I specify that a class does not receive any message

2012-08-22 Thread Lenny Marks
On Aug 22, 2012, at 10:36 AM, David Chelimsky wrote: > On Wed, Aug 22, 2012 at 9:16 AM, J. B. Rainsberger wrote: >> On Wed, Aug 22, 2012 at 10:07 AM, David Chelimsky >> wrote: >>> >>> On Wed, Aug 22, 2012 at 7:52 AM, J. B. Rainsberger wrote: On Tue, Aug 21, 2012 at 11:37 PM, Bas Vodde w

Re: [rspec-users] How do I specify that a class does not receive any message

2012-08-22 Thread J. B. Rainsberger
On Wed, Aug 22, 2012 at 11:36 AM, David Chelimsky wrote: > On Wed, Aug 22, 2012 at 9:16 AM, J. B. Rainsberger wrote: > > On Wed, Aug 22, 2012 at 10:07 AM, David Chelimsky > > wrote: > >> > >> On Wed, Aug 22, 2012 at 7:52 AM, J. B. Rainsberger > wrote: > >> > On Tue, Aug 21, 2012 at 11:37 PM, Ba

Re: [rspec-users] How do I specify that a class does not receive any message

2012-08-22 Thread David Chelimsky
On Wed, Aug 22, 2012 at 9:16 AM, J. B. Rainsberger wrote: > On Wed, Aug 22, 2012 at 10:07 AM, David Chelimsky > wrote: >> >> On Wed, Aug 22, 2012 at 7:52 AM, J. B. Rainsberger wrote: >> > On Tue, Aug 21, 2012 at 11:37 PM, Bas Vodde wrote: >> >> >> >> >> >> JB is right. >> >> >> >> Sometimes, fo

Re: [rspec-users] How do I specify that a class does not receive any message

2012-08-22 Thread J. B. Rainsberger
On Wed, Aug 22, 2012 at 10:07 AM, David Chelimsky wrote: > On Wed, Aug 22, 2012 at 7:52 AM, J. B. Rainsberger wrote: > > On Tue, Aug 21, 2012 at 11:37 PM, Bas Vodde wrote: > >> > >> > >> JB is right. > >> > >> Sometimes, for clarity, it is useful to add should_not, but for > >> functionality it

Re: [rspec-users] How do I specify that a class does not receive any message

2012-08-22 Thread David Chelimsky
On Wed, Aug 22, 2012 at 7:52 AM, J. B. Rainsberger wrote: > On Tue, Aug 21, 2012 at 11:37 PM, Bas Vodde wrote: >> >> >> JB is right. >> >> Sometimes, for clarity, it is useful to add should_not, but for >> functionality it is usually not needed. > > > I know JMock has never() for this people. Sho

Re: [rspec-users] How do I specify that a class does not receive any message

2012-08-22 Thread J. B. Rainsberger
On Tue, Aug 21, 2012 at 11:37 PM, Bas Vodde wrote: > > JB is right. > > Sometimes, for clarity, it is useful to add should_not, but for > functionality it is usually not needed. > I know JMock has never() for this people. Should RSpec-mocks have something like object.should_receive(:nothing). --

Re: [rspec-users] and_raise with a message

2012-08-22 Thread David Chelimsky
On Wed, Aug 22, 2012 at 6:55 AM, David Chelimsky wrote: > On Wed, Aug 22, 2012 at 6:43 AM, Bas Vodde wrote: >> >> On 22 Aug, 2012, at 7:25 PM, David Chelimsky wrote: >> >>> On Wed, Aug 22, 2012 at 12:56 AM, Bas Vodde wrote: Hiya all, I was trying to get and_raise to raise an

Re: [rspec-users] and_raise with a message

2012-08-22 Thread David Chelimsky
On Wed, Aug 22, 2012 at 6:43 AM, Bas Vodde wrote: > > On 22 Aug, 2012, at 7:25 PM, David Chelimsky wrote: > >> On Wed, Aug 22, 2012 at 12:56 AM, Bas Vodde wrote: >>> >>> Hiya all, >>> >>> I was trying to get and_raise to raise an exception filled with a message >>> and I was struggling with the

Re: [rspec-users] and_raise with a message

2012-08-22 Thread Bas Vodde
Hi David, My main thinking was to make it consistent with the Kernel.raise. Like, in my production code, I have: raise Osaka::SystemCommandFailed, output_message so, it would make sense to the mock to work the same with: and_raise Osaka::SystemCommandFailed, "Fake output message" I figured i

Re: [rspec-users] and_raise with a message

2012-08-22 Thread David Chelimsky
On Wed, Aug 22, 2012 at 12:56 AM, Bas Vodde wrote: > > Hiya all, > > I was trying to get and_raise to raise an exception filled with a message and > I was struggling with the API for a while (not on the latest RSpec, but > assume it didn't change). > > Based on that, I have a suggestion for impr

Re: [rspec-users] Fwd: [Rails] Re: hii friends, , , , , i m new to rails......i think there is a problem in destroy command .

2012-08-22 Thread David Chelimsky
On Wed, Aug 22, 2012 at 12:40 AM, Fahim Patel wrote: > friends there is no reply from Rails community.Lots of days are gone. > can u answer this problem. > Regards > Fahim Babar Patel > > > -- Forwarded message -- > From: Fahim Patel > Date: Fri, Aug 17, 2012 at 10:49 AM > Subject