# integration_test.rbIn fact, I stole the idea and changed it up a bit for sqldsl.
begin # rescue LoadError
$stderr.puts "Skipping integration tests. `gem install mocha` and try again."
unless File.directory? File.dirname(__FILE__) + '/../vendor/mocha-0.4.0/'However, now I'm wondering if Rails should depend on, and include Mocha.
raise "mocha 4.0 is required to run the test suite. create the 'vendor' directory as
a sibling of test and 'gem unpack mocha' in 'vendor'"
$:.unshift File.dirname(__FILE__) + '/../vendor/mocha-0.4.0/lib/'
require File.dirname(__FILE__) + '/../vendor/mocha-0.4.0/lib/mocha'
I've previously written that I think xUnit frameworks should include Mocks. Since Rails bakes in testing, I believe it should provide you with the full array of testing tools, including Mocks.