From 6416a35f4b3290a93145d40045147fc01d36e756 Mon Sep 17 00:00:00 2001 From: Carlhuda Date: Wed, 17 Mar 2010 14:23:00 -0700 Subject: Remove unneeded AV::Base and AV::Template monkey-patches --- actionpack/test/controller/action_pack_assertions_test.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'actionpack/test/controller/action_pack_assertions_test.rb') 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 -- cgit v1.2.3 From d9375f3f302a5d1856ad57946c7263d4e6a45a2a Mon Sep 17 00:00:00 2001 From: Carlhuda Date: Wed, 17 Mar 2010 16:28:05 -0700 Subject: Modify assert_template to use notifications. Also, remove ActionController::Base#template since it is no longer needed. --- actionpack/test/controller/action_pack_assertions_test.rb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'actionpack/test/controller/action_pack_assertions_test.rb') diff --git a/actionpack/test/controller/action_pack_assertions_test.rb b/actionpack/test/controller/action_pack_assertions_test.rb index b6810b0c27..1741b58f72 100644 --- a/actionpack/test/controller/action_pack_assertions_test.rb +++ b/actionpack/test/controller/action_pack_assertions_test.rb @@ -181,6 +181,8 @@ module Admin end end +# require "action_dispatch/test_process" + # a test case to exercise the new capabilities TestRequest & TestResponse class ActionPackAssertionsControllerTest < ActionController::TestCase # -- assertion-based testing ------------------------------------------------ @@ -303,14 +305,14 @@ class ActionPackAssertionsControllerTest < ActionController::TestCase # make sure that the template objects exist def test_template_objects_alive process :assign_this - assert !@controller.template.instance_variable_get(:"@hi") - assert @controller.template.instance_variable_get(:"@howdy") + assert !@controller.instance_variable_get(:"@hi") + assert @controller.instance_variable_get(:"@howdy") end # make sure we don't have template objects when we shouldn't def test_template_object_missing process :nothing - assert_nil @controller.template.assigns['howdy'] + assert_nil @controller.instance_variable_get(:@howdy) end # check the empty flashing -- cgit v1.2.3