aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/abstract_unit.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/test/abstract_unit.rb')
-rw-r--r--actionpack/test/abstract_unit.rb17
1 files changed, 16 insertions, 1 deletions
diff --git a/actionpack/test/abstract_unit.rb b/actionpack/test/abstract_unit.rb
index b062a71442..07ba37c51c 100644
--- a/actionpack/test/abstract_unit.rb
+++ b/actionpack/test/abstract_unit.rb
@@ -6,6 +6,8 @@ $:.unshift(File.dirname(__FILE__) + '/lib')
$:.unshift(File.dirname(__FILE__) + '/fixtures/helpers')
$:.unshift(File.dirname(__FILE__) + '/fixtures/alternate_helpers')
+ENV['TMPDIR'] = File.join(File.dirname(__FILE__), 'tmp')
+
ENV['new_base'] = "true"
$stderr.puts "Running old tests on new_base"
@@ -60,20 +62,33 @@ module ActionController
}
Base.session_store = nil
+ class << Routing
+ def possible_controllers
+ @@possible_controllers ||= []
+ end
+ end
+
class Base
include ActionController::Testing
+
+ def self.inherited(klass)
+ name = klass.name.underscore.sub(/_controller$/, '')
+ ActionController::Routing.possible_controllers << name unless name.blank?
+ super
+ end
end
Base.view_paths = FIXTURE_LOAD_PATH
class TestCase
include TestProcess
+
setup do
ActionController::Routing::Routes.draw do |map|
map.connect ':controller/:action/:id'
end
end
-
+
def assert_template(options = {}, message = nil)
validate_request!