[mocha-developer] did something in revision 68 break stubs?

Greg Borenstein greg at virtuous.com
Thu Oct 12 14:33:36 EDT 2006


Hi,

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:
test_find_venue_id_returns_nil(UpcomingMessageTest):
NoMethodError: undefined method `stubs' for #<UpcomingMessage:0x2a983cb2e0>
    
/home/greg/projects/mercury/config/../vendor/rails/activerecord/lib/active_record/base.rb:1845:in 
`method_missing'
    test/unit/upcoming_message_test.rb:116:in 
`test_find_venue_id_returns_nil'
    
/home/greg/projects/mercury/config/../vendor/plugins/mocha/lib/mocha/test_case_adapter.rb:19:in 
`run'

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.

Thanks for the help,

Greg
http://www.urbanhonking.com/ideasfordozens
http://www.virtuous.com





More information about the mocha-developer mailing list