2006-09-02 20:18:31 -04:00
|
|
|
$:.unshift File.dirname(__FILE__) + "/../../activesupport/lib"
|
|
|
|
$:.unshift File.dirname(__FILE__) + "/../../actionpack/lib"
|
|
|
|
$:.unshift File.dirname(__FILE__) + "/../lib"
|
|
|
|
$:.unshift File.dirname(__FILE__) + "/../builtin/rails_info"
|
|
|
|
|
|
|
|
require 'test/unit'
|
2007-09-23 07:20:25 -04:00
|
|
|
require 'stringio'
|
2007-03-01 18:29:56 -05:00
|
|
|
require 'active_support'
|
2006-09-02 20:18:31 -04:00
|
|
|
|
2007-09-22 22:11:44 -04:00
|
|
|
# Wrap tests that use Mocha and skip if unavailable.
|
|
|
|
def uses_mocha(test_name)
|
|
|
|
require 'rubygems'
|
|
|
|
gem 'mocha', '>= 0.5.5'
|
|
|
|
require 'mocha'
|
|
|
|
yield
|
|
|
|
rescue LoadError
|
|
|
|
$stderr.puts "Skipping #{test_name} tests. `gem install mocha` and try again."
|
|
|
|
end
|
2007-09-23 07:20:25 -04:00
|
|
|
|
|
|
|
if defined?(RAILS_ROOT)
|
|
|
|
RAILS_ROOT.replace File.dirname(__FILE__)
|
|
|
|
else
|
|
|
|
RAILS_ROOT = File.dirname(__FILE__)
|
|
|
|
end
|