Changeset 4824
- Timestamp:
- 08/26/06 05:58:16 (2 years ago)
- Files:
-
- trunk/actionpack/CHANGELOG (modified) (1 diff)
- trunk/actionpack/test/controller/deprecated_instance_variables_test.rb (modified) (1 diff)
- trunk/actionpack/test/fixtures/deprecated_instance_variables (added)
- trunk/actionpack/test/fixtures/deprecated_instance_variables/_flash_ivar.rhtml (added)
- trunk/actionpack/test/fixtures/deprecated_instance_variables/_flash_method.rhtml (added)
- trunk/actionpack/test/fixtures/deprecated_instance_variables/_params_ivar.rhtml (added)
- trunk/actionpack/test/fixtures/deprecated_instance_variables/_params_method.rhtml (added)
- trunk/actionpack/test/fixtures/deprecated_instance_variables/_session_ivar.rhtml (added)
- trunk/actionpack/test/fixtures/deprecated_instance_variables/_session_method.rhtml (added)
- trunk/actionpack/test/template/deprecated_instance_variables_test.rb (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/actionpack/CHANGELOG
r4822 r4824 1 1 *SVN* 2 2 3 * Changed the POST parameter processing to use the new QueryStringParser [DHH] 3 * Deprecation: test deprecated instance vars in partials. [Jeremy Kemper] 4 5 * Changed the POST parameter processing to use the new QueryStringParser and make the result a indifferent hash [DHH] 4 6 5 7 * Add UrlWriter to allow writing urls from Mailers and scripts. [Nicholas Seckar] trunk/actionpack/test/controller/deprecated_instance_variables_test.rb
r4717 r4824 1 1 require File.dirname(__FILE__) + '/../abstract_unit' 2 2 3 class Deprecated InstanceVariablesTest < Test::Unit::TestCase3 class DeprecatedControllerInstanceVariablesTest < Test::Unit::TestCase 4 4 class Target < ActionController::Base 5 5 def initialize(run = nil) trunk/actionpack/test/template/deprecated_instance_variables_test.rb
r4715 r4824 1 1 require File.dirname(__FILE__) + '/../abstract_unit' 2 2 3 class DeprecatedInstanceVariablesTest < Test::Unit::TestCase 4 class Target < ActionController::Base 3 class DeprecatedViewInstanceVariablesTest < Test::Unit::TestCase 4 class DeprecatedInstanceVariablesController < ActionController::Base 5 self.template_root = "#{File.dirname(__FILE__)}/../fixtures/" 6 7 def self.controller_path; 'deprecated_instance_variables' end 8 5 9 ActionController::Base::DEPRECATED_INSTANCE_VARIABLES.each do |var| 6 10 class_eval <<-end_eval 7 def old_#{var}; render :inline => '<%= @#{var}.inspect %>' end 8 def new_#{var}; render :inline => '<%= #{var}.inspect %>' end 11 def old_#{var}_inline; render :inline => '<%= @#{var}.inspect %>' end 12 def new_#{var}_inline; render :inline => '<%= #{var}.inspect %>' end 13 def old_#{var}_partial; render :partial => '#{var}_ivar' end 14 def new_#{var}_partial; render :partial => '#{var}_method' end 9 15 end_eval 10 16 end … … 16 22 @request = ActionController::TestRequest.new 17 23 @response = ActionController::TestResponse.new 18 @controller = Target.new24 @controller = DeprecatedInstanceVariablesController.new 19 25 end 20 26 … … 22 28 class_eval <<-end_eval, __FILE__, __LINE__ 23 29 def test_old_#{var}_is_deprecated 24 assert_deprecated('@#{var}') { get :old_#{var} }30 assert_deprecated('@#{var}') { get :old_#{var}_inline } 25 31 end 26 32 def test_new_#{var}_isnt_deprecated 27 assert_not_deprecated { get :new_#{var} } 33 assert_not_deprecated { get :new_#{var}_inline } 34 end 35 def test_old_#{var}_partial_is_deprecated 36 assert_deprecated('@#{var}') { get :old_#{var}_partial } 37 end 38 def test_new_#{var}_partial_isnt_deprecated 39 assert_not_deprecated { get :new_#{var}_partial } 28 40 end 29 41 end_eval