[rspec-users] and_raise with a message

2012-08-21 Thread Bas Vodde
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 improvement. My first attempt was to mirror how I use raise, so I tr

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

2012-08-21 Thread Fahim Patel
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: [Rails] Re: hii friends,i m new to rails..i think there is a pr

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

2012-08-21 Thread Bas Vodde
JB is right. Sometimes, for clarity, it is useful to add should_not, but for functionality it is usually not needed. Bas On 22 Aug, 2012, at 4:12 AM, J. B. Rainsberger wrote: > On Tue, Aug 21, 2012 at 5:02 PM, Andrew Premdas wrote: > I want to write > > it "should ..." do > Client.shoul

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

2012-08-21 Thread J. B. Rainsberger
On Tue, Aug 21, 2012 at 5:02 PM, Andrew Premdas wrote: > I want to write > > it "should ..." do > Client.should_not_receive(any_message) > # do something here that might do Client.xxx > end > I might be wrong, but if you use a mock object and set no expectations on it, it will expect no mess