From e976c489e6416cdc4714721df78dd43dd6d13d99 Mon Sep 17 00:00:00 2001 From: Pratik Naik Date: Sat, 23 May 2009 00:17:05 +0200 Subject: Add all the existing helpers related features to the new base --- actionpack/test/controller/helper_test.rb | 6 +++--- actionpack/test/new_base/abstract_unit.rb | 3 +++ actionpack/test/new_base/render_text_test.rb | 3 --- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'actionpack/test') diff --git a/actionpack/test/controller/helper_test.rb b/actionpack/test/controller/helper_test.rb index 3bbda9eb3a..5b9feb3630 100644 --- a/actionpack/test/controller/helper_test.rb +++ b/actionpack/test/controller/helper_test.rb @@ -27,7 +27,7 @@ module Fun end end -class ApplicationController < ActionController::Base +class AllHelpersController < ActionController::Base helper :all end @@ -127,7 +127,7 @@ class HelperTest < Test::Unit::TestCase end def test_all_helpers - methods = ApplicationController.master_helper_module.instance_methods.map(&:to_s) + methods = AllHelpersController.master_helper_module.instance_methods.map(&:to_s) # abc_helper.rb assert methods.include?('bare_a') @@ -154,7 +154,7 @@ class HelperTest < Test::Unit::TestCase end def test_helper_proxy - methods = ApplicationController.helpers.methods.map(&:to_s) + methods = AllHelpersController.helpers.methods.map(&:to_s) # ActionView assert methods.include?('pluralize') diff --git a/actionpack/test/new_base/abstract_unit.rb b/actionpack/test/new_base/abstract_unit.rb index 5df3467ff5..569e4e764f 100644 --- a/actionpack/test/new_base/abstract_unit.rb +++ b/actionpack/test/new_base/abstract_unit.rb @@ -2,6 +2,9 @@ $:.unshift(File.dirname(__FILE__) + '/../../lib') $:.unshift(File.dirname(__FILE__) + '/../../../activesupport/lib') $:.unshift(File.dirname(__FILE__) + '/../lib') +$:.unshift(File.dirname(__FILE__) + '/../fixtures/helpers') +$:.unshift(File.dirname(__FILE__) + '/../fixtures/alternate_helpers') + ENV['new_base'] = "true" $stderr.puts "Running old tests on new_base" diff --git a/actionpack/test/new_base/render_text_test.rb b/actionpack/test/new_base/render_text_test.rb index aed903ee8a..ffc149283b 100644 --- a/actionpack/test/new_base/render_text_test.rb +++ b/actionpack/test/new_base/render_text_test.rb @@ -1,8 +1,5 @@ require File.join(File.expand_path(File.dirname(__FILE__)), "test_helper") -class ApplicationController < ActionController::Base -end - module RenderText class SimpleController < ActionController::Base self.view_paths = [ActionView::Template::FixturePath.new] -- cgit v1.2.3