[mocha-developer] did something in revision 68 break stubs?
jamesmead44 at gmail.com
Thu Oct 12 17:16:30 EDT 2006
On 12/10/06, Greg Borenstein <greg at virtuous.com> wrote:
> I've been a happy user of Mocha for a while now. My current project is
> by far the most complicated I've ever worked on and Mocha has made
> testing it much easier than it would otherwise be.
> So, I was highly disturbed to come in this morning, run svn up and find
> that something in today's update broke lots of my tests. I use Mocha as
> a Rails plugin under svn:externals and when I hit svn up, I was updated
> to revision 68. Then when I ran my morning's ritual full test run all
> the tests that call 'stubs' threw erros like this one:
> 7) Error:
> NoMethodError: undefined method `stubs' for
> The problem seems to be occuring in lib/mocha/test_case_adapter.rb which
> was updated by revision 68.
> Wondering if anyone else is seeing this problem and if not where I
> should start to look in my code for the incompatibility. I've looked and
> looked to see if something I changed recenly could possibly have caused
> this problem (even canceled posting to this list once because I thought
> I'd found it), but I can't see what I could be doing wrong.
I'm glad you've been finding Mocha useful. You were right about the bug - it
should be fixed in revision 70 (latest HEAD). Sorry.
I have to confess that I have been making relatively large changes to Mocha
recently in HEAD. I had forgotten that the default for Rails plugins with
svn:externals is to use HEAD - we use Piston (http://piston.rubyforge.org/)
to have more control over plugin versions and so hadn't noticed the bug.
The bug was a typo in a require statement. Mocha's tests were passing
because other tests had already loaded the missing file. I've been meaning
to add a mini Rails project to test the plugin more extensively - I guess I
should make it a higher priority!
I hope that helps.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the mocha-developer