Rails 3 and Mocha: Mocked functionality not isolated to a test
daniel Fri, 12/03/2010 - 12:07pm
Basically, in the Gemfile of your project, the require for Mocha should look like:
gem 'mocha', :require => false
Then in test/test_helper.rb, add a require line for mocha
require File.expand_path('../../config/environment', __FILE__)
I think the require line for mocha in the Gemfile means that you need to already have mocha installed as a gem, bundler won't take care of it for you.