instiki/vendor/rails/actionpack/test/abstract_unit.rb

45 lines
1.2 KiB
Ruby
Raw Normal View History

2007-01-22 14:43:50 +01:00
$:.unshift(File.dirname(__FILE__) + '/../lib')
$:.unshift(File.dirname(__FILE__) + '/../../activesupport/lib')
2007-01-22 14:43:50 +01:00
$:.unshift(File.dirname(__FILE__) + '/fixtures/helpers')
$:.unshift(File.dirname(__FILE__) + '/fixtures/alternate_helpers')
2007-01-22 14:43:50 +01:00
require 'rubygems'
2007-01-22 14:43:50 +01:00
require 'yaml'
require 'stringio'
2007-01-22 14:43:50 +01:00
require 'test/unit'
gem 'mocha', '>= 0.9.3'
require 'mocha'
2007-01-22 14:43:50 +01:00
begin
require 'ruby-debug'
Debugger.settings[:autoeval] = true
Debugger.start
rescue LoadError
# Debugging disabled. `gem install ruby-debug` to enable.
end
require 'action_controller'
require 'action_controller/cgi_ext'
require 'action_controller/test_process'
require 'action_view/test_case'
# Show backtraces for deprecated behavior for quicker cleanup.
ActiveSupport::Deprecation.debug = true
2007-01-22 14:43:50 +01:00
ActionController::Base.logger = nil
ActionController::Routing::Routes.reload rescue nil
ActionController::Base.session_store = nil
# Register danish language for testing
I18n.backend.store_translations 'da', {}
ORIGINAL_LOCALES = I18n.available_locales.map(&:to_s).sort
FIXTURE_LOAD_PATH = File.join(File.dirname(__FILE__), 'fixtures')
ActionController::Base.view_paths = FIXTURE_LOAD_PATH
def uses_mocha(test_name)
yield
end