freerange/mocha — pull request #163 by ktdreyer (2013-07-28 03:51:50+00:00)
Title: require "mocha/setup" in test_helper

When running the tests individually (outside of rake or bundler, as in #121), the tests fail because we don't require mocha/setup before referring to classes named "Mocha".

ruby -e 'Dir.glob('\''./test/{unit,acceptance}/**/*_test.rb'\'').each {|t| req
uire t}'
/builddir/build/BUILDROOT/rubygem-mocha-0.14.0-1.fc19.i386/usr/share/gems/gems/mocha-0.14.0/test/test_helper.rb:26:in `': uninitialized constant Mocha (NameError)
from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:51:in `require'
from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:51:in `require'
from /builddir/build/BUILDROOT/rubygem-mocha-0.14.0-1.fc19.i386/usr/share/gems/gems/mocha-0.14.0/test/unit/parameters_matcher_test.rb:1:in `'
from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:51:in `require'
from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:51:in `require'
from -e:1:in `block in

'
from -e:1:in `each'
from -e:1:in `

'

This pull request loads "mocha/setup" in the test_helper so that the tests can run again.