2004-11-24 01:04:44 +00:00
|
|
|
$:.unshift(File.dirname(__FILE__) + '/../lib')
|
2005-11-13 11:13:11 +00:00
|
|
|
$:.unshift(File.dirname(__FILE__) + '/../../activesupport/lib/active_support')
|
2005-04-17 06:16:00 +00:00
|
|
|
$:.unshift(File.dirname(__FILE__) + '/fixtures/helpers')
|
2004-11-24 01:04:44 +00:00
|
|
|
|
2006-03-05 18:59:58 +00:00
|
|
|
require 'yaml'
|
2004-11-24 01:04:44 +00:00
|
|
|
require 'test/unit'
|
|
|
|
require 'action_controller'
|
2005-11-13 11:13:11 +00:00
|
|
|
require 'breakpoint'
|
2004-11-24 01:04:44 +00:00
|
|
|
require 'action_controller/test_process'
|
|
|
|
|
2006-09-04 03:38:13 +00:00
|
|
|
# Show backtraces for deprecated behavior for quicker cleanup.
|
|
|
|
ActiveSupport::Deprecation.debug = true
|
|
|
|
|
2004-11-24 01:04:44 +00:00
|
|
|
ActionController::Base.logger = nil
|
2005-07-21 07:14:35 +00:00
|
|
|
ActionController::Base.ignore_missing_templates = false
|
2006-09-04 03:38:13 +00:00
|
|
|
ActionController::Routing::Routes.reload rescue nil
|
2007-01-14 12:49:55 +00:00
|
|
|
|
|
|
|
|
|
|
|
# Wrap tests that use Mocha and skip if unavailable.
|
|
|
|
def uses_mocha(test_name)
|
|
|
|
require 'mocha'
|
|
|
|
require 'stubba'
|
|
|
|
yield
|
|
|
|
rescue LoadError
|
|
|
|
$stderr.puts "Skipping #{test_name} tests. `gem install mocha` and try again."
|
|
|
|
end
|