diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2008-11-20 08:52:48 +0100 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2008-11-20 08:52:48 +0100 |
commit | 206c5643aae40b0884d42fdb8caeb3f763936fa9 (patch) | |
tree | 608f5cc7daab7b58b3d159429c595303e7e1c7d4 /actionpack/test/abstract_unit.rb | |
parent | fb1eebac940d0648d1640d20a24f085d901d6f30 (diff) | |
parent | 20a346170cf3922d16e265487cfb1abcc85383c1 (diff) | |
download | rails-206c5643aae40b0884d42fdb8caeb3f763936fa9.tar.gz rails-206c5643aae40b0884d42fdb8caeb3f763936fa9.tar.bz2 rails-206c5643aae40b0884d42fdb8caeb3f763936fa9.zip |
Merge branch 'master' of git@github.com:rails/rails
Diffstat (limited to 'actionpack/test/abstract_unit.rb')
-rw-r--r-- | actionpack/test/abstract_unit.rb | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/actionpack/test/abstract_unit.rb b/actionpack/test/abstract_unit.rb index 673efa6af0..9623afa89d 100644 --- a/actionpack/test/abstract_unit.rb +++ b/actionpack/test/abstract_unit.rb @@ -2,20 +2,26 @@ $:.unshift(File.dirname(__FILE__) + '/../lib') $:.unshift(File.dirname(__FILE__) + '/../../activesupport/lib') $:.unshift(File.dirname(__FILE__) + '/fixtures/helpers') +require 'rubygems' require 'yaml' require 'stringio' require 'test/unit' -require 'action_controller' -require 'action_controller/cgi_ext' -require 'action_controller/test_process' -require 'action_view/test_case' + +gem 'mocha', '>= 0.9.0' +require 'mocha' begin require 'ruby-debug' + 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 @@ -26,14 +32,6 @@ FIXTURE_LOAD_PATH = File.join(File.dirname(__FILE__), 'fixtures') ActionView::PathSet::Path.eager_load_templates! ActionController::Base.view_paths = FIXTURE_LOAD_PATH -# 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 => load_error - raise unless load_error.message =~ /mocha/i - $stderr.puts "Skipping #{test_name} tests. `gem install mocha` and try again." end |