[rspec-users] Counter.should_not_receive(:message) not working?
jko170 at gmail.com
Thu Mar 17 20:53:05 EDT 2011
On Thu, Mar 17, 2011 at 2:55 PM, Pete Campbell <lists at ruby-forum.com> wrote:
> Even simpler...
> describe 'Show' do
> it 'should fail because increment is called' do
> Counter.should_not_receive(:increment) # Incorrectly passes
> get :show, :count_me => 'true'
> it 'should fail because increment is not called' do
> Counter.should_receive(:increment) # Correctly fails
> get :show
> Posted via http://www.ruby-forum.com/.
> rspec-users mailing list
> rspec-users at rubyforge.org
I would say "count_me" is not returning what you think it is. Try adding
"raise count_me.inspect" in the controller action to see if this is the
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the rspec-users