I recently set up an app on a new (old) computer, and I’m having
problems running my tests. For some reason, mocha is not behaving at
all. The first thing that happened was that all calls to stub
(Mocha::API#stub) failed with a
“undefined method `stub’ for #AnyObjectTest:0xb68ae420”.
After some investigation in irb and script/console I tried to “import
Mocha::API” in my test/test_helper.rb. That solved my initial problem,
but brought on
to define Mocha::Integration::TestUnit (LoadError)”
So, obviously something’s amiss. I’m on Ubuntu. I installed Mocha
through RubyGems 1.3.5 (manually installed, not the apt one).
Any ideas on how to fix this?