[rspec-users] Counter.should_not_receive(:message) not working?

Pete Campbell lists at ruby-forum.com
Thu Mar 17 17:55:23 EDT 2011


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'
  end
  it 'should fail because increment is not called' do
    Counter.should_receive(:increment)    # Correctly fails
    get :show
  end
end

-- 
Posted via http://www.ruby-forum.com/.


More information about the rspec-users mailing list