Bugs: Browse | Submit New | Admin

[#11885] never doesn't work with stub_everything

Date:
2007-06-27 14:13
Priority:
3
Submitted By:
Alexander Lang (langalex)
Assigned To:
Nobody (None)
Category:
None
State:
Closed
Summary:
never doesn't work with stub_everything

Detailed description
running the following results in a succesful test with mocha 0.5.1 - it should fail because x is called on o.

require 'rubygems'
require 'test/unit'
require 'mocha'


class MyTest < Test::Unit::TestCase
  def test_never
    o = stub_everything
    o.expects(:x).never
    o.x
  end
end

Add A Comment: Notepad

Please login


Followup

Message
Date: 2007-07-05 17:37
Sender: James Mead

Mocha 0.5.2 which fixes this bug has now been released.
Date: 2007-06-30 15:59
Sender: James Mead

I've just committed what I hope is a fix (revision 156). If you
are in a position to test the fix, it would be great if you could
give it a try and let me know how you get on. I'd like to run
it against a couple of work projects to make sure I haven't broken
anything and then I'll release it. Thanks.
Date: 2007-06-30 13:33
Sender: James Mead

You are quite right. Thanks for the bug report. In fact there
are a few issues related to this. I need to have a bit of a think
about it...

Attached Files:

Name Description Download
No Files Currently Attached

Changes:

Field Old Value Date By
status_idOpen2007-07-05 17:37jamesmead
close_date2007-07-05 17:372007-07-05 17:37jamesmead