cf865196fe
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6498 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
29 lines
835 B
Ruby
29 lines
835 B
Ruby
$:.unshift(File.dirname(__FILE__) + '/../lib')
|
|
$:.unshift(File.dirname(__FILE__) + '/../../activesupport/lib/active_support')
|
|
$:.unshift(File.dirname(__FILE__) + '/fixtures/helpers')
|
|
|
|
require 'yaml'
|
|
require 'test/unit'
|
|
require 'action_controller'
|
|
require 'breakpoint'
|
|
require 'action_controller/test_process'
|
|
|
|
# Show backtraces for deprecated behavior for quicker cleanup.
|
|
ActiveSupport::Deprecation.debug = true
|
|
|
|
ActionController::Base.logger = nil
|
|
ActionController::Base.ignore_missing_templates = false
|
|
ActionController::Routing::Routes.reload rescue nil
|
|
|
|
|
|
# Wrap tests that use Mocha and skip if unavailable.
|
|
def uses_mocha(test_name)
|
|
unless Object.const_defined?(:Mocha)
|
|
require 'mocha'
|
|
require 'stubba'
|
|
end
|
|
yield
|
|
rescue LoadError
|
|
$stderr.puts "Skipping #{test_name} tests. `gem install mocha` and try again."
|
|
end
|