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 <m...@jbrains.ca> wrote:

> On Tue, Aug 21, 2012 at 5:02 PM, Andrew Premdas <aprem...@gmail.com> 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 messages. Have you tried that?
> -- 
> J. B. (Joe) Rainsberger :: http://www.jbrains.ca :: 
> http://blog.thecodewhisperer.com
> Author, JUnit Recipes
> Free Your Mind to Do Great Work :: http://www.freeyourmind-dogreatwork.com
> 
> _______________________________________________
> rspec-users mailing list
> rspec-users@rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users

_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to