Massage setup for old tests on new base

This commit is contained in:
Jeremy Kemper
2009-05-20 16:23:55 -07:00
parent c86ec82cf6
commit 205cfe2163
3 changed files with 6 additions and 9 deletions

View File

@@ -57,8 +57,7 @@ end
desc 'Old Controller Tests on New Base'
Rake::TestTask.new(:test_new_base_on_old_tests) do |t|
ENV['new_base'] = "true"
t.libs << "test"
t.libs << "test/new_base" << "test"
# content_type mime_responds layout
t.test_files = %w(
addresses_render base benchmark caching capture dispatcher record_identifier

View File

@@ -1,6 +1,3 @@
if ENV["new_base"]
require "abstract_unit2"
else
$:.unshift(File.dirname(__FILE__) + '/../lib')
$:.unshift(File.dirname(__FILE__) + '/../../activesupport/lib')
$:.unshift(File.dirname(__FILE__) + '/fixtures/helpers')
@@ -41,4 +38,3 @@ ORIGINAL_LOCALES = I18n.available_locales.map {|locale| locale.to_s }.sort
FIXTURE_LOAD_PATH = File.join(File.dirname(__FILE__), 'fixtures')
ActionController::Base.view_paths = FIXTURE_LOAD_PATH
end

View File

@@ -1,7 +1,9 @@
$:.unshift(File.dirname(__FILE__) + '/../../lib')
$:.unshift(File.dirname(__FILE__) + '/../../../activesupport/lib')
$:.unshift(File.dirname(__FILE__) + '/../lib')
$:.unshift(File.dirname(__FILE__) + '/../../activesupport/lib')
$:.unshift(File.dirname(__FILE__) + '/lib')
ENV['new_base'] = "true"
$stderr.puts "Running old tests on new_base"
require 'test/unit'
require 'active_support'
@@ -16,7 +18,7 @@ require 'active_support/dependencies'
ActiveSupport::Dependencies.hook!
FIXTURE_LOAD_PATH = File.join(File.dirname(__FILE__), 'fixtures')
FIXTURE_LOAD_PATH = File.join(File.dirname(__FILE__), '../fixtures')
module ActionController
Base.session = {