2004-11-23 20:04:44 -05:00
|
|
|
$:.unshift(File.dirname(__FILE__) + '/../lib')
|
2008-10-04 04:13:14 -04:00
|
|
|
$:.unshift(File.dirname(__FILE__) + '/../../activesupport/lib')
|
2005-04-17 02:16:00 -04:00
|
|
|
$:.unshift(File.dirname(__FILE__) + '/fixtures/helpers')
|
2008-11-20 17:05:20 -05:00
|
|
|
$:.unshift(File.dirname(__FILE__) + '/fixtures/alternate_helpers')
|
2004-11-23 20:04:44 -05:00
|
|
|
|
2008-11-19 22:14:52 -05:00
|
|
|
require 'rubygems'
|
2006-03-05 13:59:58 -05:00
|
|
|
require 'yaml'
|
2007-05-15 17:36:21 -04:00
|
|
|
require 'stringio'
|
2004-11-23 20:04:44 -05:00
|
|
|
require 'test/unit'
|
2008-11-19 22:14:52 -05:00
|
|
|
|
2008-11-23 17:48:36 -05:00
|
|
|
gem 'mocha', '>= 0.9.3'
|
2008-11-19 22:14:52 -05:00
|
|
|
require 'mocha'
|
2004-11-23 20:04:44 -05:00
|
|
|
|
2007-05-27 20:00:07 -04:00
|
|
|
begin
|
|
|
|
require 'ruby-debug'
|
2008-11-29 19:55:02 -05:00
|
|
|
Debugger.settings[:autoeval] = true
|
2008-11-19 22:14:52 -05:00
|
|
|
Debugger.start
|
2007-05-27 20:00:07 -04:00
|
|
|
rescue LoadError
|
|
|
|
# Debugging disabled. `gem install ruby-debug` to enable.
|
|
|
|
end
|
2007-05-27 12:38:02 -04:00
|
|
|
|
2008-11-19 22:14:52 -05:00
|
|
|
require 'action_controller'
|
|
|
|
require 'action_controller/cgi_ext'
|
|
|
|
require 'action_controller/test_process'
|
|
|
|
require 'action_view/test_case'
|
|
|
|
|
2006-09-03 23:38:13 -04:00
|
|
|
# Show backtraces for deprecated behavior for quicker cleanup.
|
|
|
|
ActiveSupport::Deprecation.debug = true
|
|
|
|
|
2004-11-23 20:04:44 -05:00
|
|
|
ActionController::Base.logger = nil
|
2006-09-03 23:38:13 -04:00
|
|
|
ActionController::Routing::Routes.reload rescue nil
|
2007-01-14 07:49:55 -05:00
|
|
|
|
2008-12-15 17:33:31 -05:00
|
|
|
ActionController::Base.session_store = nil
|
|
|
|
|
2008-07-12 15:11:51 -04:00
|
|
|
FIXTURE_LOAD_PATH = File.join(File.dirname(__FILE__), 'fixtures')
|
|
|
|
ActionController::Base.view_paths = FIXTURE_LOAD_PATH
|
2007-01-14 07:49:55 -05:00
|
|
|
|
|
|
|
def uses_mocha(test_name)
|
|
|
|
yield
|
|
|
|
end
|