1 $
:.unshift(File
.dirname(__FILE__
) + '/../lib')
2 $
:.unshift(File
.dirname(__FILE__
) + '/../../activesupport/lib')
3 $
:.unshift(File
.dirname(__FILE__
) + '/fixtures/helpers')
8 require 'action_controller'
9 require 'action_controller/cgi_ext'
10 require 'action_controller/test_process'
11 require 'action_view/test_case'
16 # Debugging disabled. `gem install ruby-debug` to enable.
19 # Show backtraces for deprecated behavior for quicker cleanup.
20 ActiveSupport
::Deprecation.debug
= true
22 ActionController
::Base.logger
= nil
23 ActionController
::Routing::Routes.reload
rescue nil
25 FIXTURE_LOAD_PATH
= File
.join(File
.dirname(__FILE__
), 'fixtures')
26 ActionView
::PathSet::Path.eager_load_templates
!
27 ActionController
::Base.view_paths
= FIXTURE_LOAD_PATH
29 # Wrap tests that use Mocha and skip if unavailable.
30 def uses_mocha(test_name
)
31 unless Object
.const_defined
?(:Mocha)
36 rescue LoadError
=> load_error
37 raise unless load_error
.message
=~
/mocha/i
38 $stderr.puts
"Skipping #{test_name} tests. `gem install mocha` and try again."