diff options
author | Carlhuda <carlhuda@engineyard.com> | 2010-03-17 14:23:00 -0700 |
---|---|---|
committer | Carlhuda <carlhuda@engineyard.com> | 2010-03-17 14:29:18 -0700 |
commit | 6416a35f4b3290a93145d40045147fc01d36e756 (patch) | |
tree | 00b4a7775a9446a1051e8d985a195fea7305e652 /actionpack | |
parent | 947f86c699b33bd44703b3554db58e4cfca37c86 (diff) | |
download | rails-6416a35f4b3290a93145d40045147fc01d36e756.tar.gz rails-6416a35f4b3290a93145d40045147fc01d36e756.tar.bz2 rails-6416a35f4b3290a93145d40045147fc01d36e756.zip |
Remove unneeded AV::Base and AV::Template monkey-patches
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/lib/abstract_controller/rendering.rb | 1 | ||||
-rw-r--r-- | actionpack/lib/action_view/test_case.rb | 21 | ||||
-rw-r--r-- | actionpack/test/controller/action_pack_assertions_test.rb | 5 |
3 files changed, 3 insertions, 24 deletions
diff --git a/actionpack/lib/abstract_controller/rendering.rb b/actionpack/lib/abstract_controller/rendering.rb index 16664098e5..94c9ec7478 100644 --- a/actionpack/lib/abstract_controller/rendering.rb +++ b/actionpack/lib/abstract_controller/rendering.rb @@ -1,4 +1,5 @@ require "abstract_controller/base" +require "action_view/base" module AbstractController class DoubleRenderError < Error diff --git a/actionpack/lib/action_view/test_case.rb b/actionpack/lib/action_view/test_case.rb index 8750a501b7..1c69c23bfc 100644 --- a/actionpack/lib/action_view/test_case.rb +++ b/actionpack/lib/action_view/test_case.rb @@ -2,27 +2,6 @@ require 'action_controller/test_case' require 'action_view' module ActionView - class Base - alias_method :initialize_without_template_tracking, :initialize - def initialize(*args) - @_rendered = { :template => nil, :partials => Hash.new(0) } - initialize_without_template_tracking(*args) - end - - attr_internal :rendered - end - - class Template - alias_method :render_without_tracking, :render - def render(view, locals, &blk) - rendered = view.rendered - rendered[:partials][self] += 1 if partial? - rendered[:template] ||= [] - rendered[:template] << self - render_without_tracking(view, locals, &blk) - end - end - class TestCase < ActiveSupport::TestCase class TestController < ActionController::Base attr_accessor :request, :response, :params diff --git a/actionpack/test/controller/action_pack_assertions_test.rb b/actionpack/test/controller/action_pack_assertions_test.rb index 26e0d6d844..b6810b0c27 100644 --- a/actionpack/test/controller/action_pack_assertions_test.rb +++ b/actionpack/test/controller/action_pack_assertions_test.rb @@ -365,11 +365,10 @@ class ActionPackAssertionsControllerTest < ActionController::TestCase # check if we were rendered by a file-based template? def test_rendered_action process :nothing - assert_nil @controller.template.rendered[:template] + assert_template nil process :hello_world - assert @controller.template.rendered[:template] - assert 'hello_world', @controller.template.rendered[:template].to_s + assert_template 'hello_world' end # check the redirection location |