From c90572e3ab65e02933d204747645d0de83b00481 Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Wed, 7 Jan 2009 14:39:23 -0800 Subject: [PATCH] Use instance_eval instead of adding an accessor to the class --- actionpack/test/controller/layout_test.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/actionpack/test/controller/layout_test.rb b/actionpack/test/controller/layout_test.rb index c2efe9d00b..2f5e830fba 100644 --- a/actionpack/test/controller/layout_test.rb +++ b/actionpack/test/controller/layout_test.rb @@ -146,8 +146,7 @@ class LayoutExceptionRaised < ActionController::TestCase def test_exception_raised_when_layout_file_not_found @controller = SetsNonExistentLayoutFile.new get :hello - @response.template.class.module_eval { attr_accessor :exception } - assert_equal ActionView::MissingTemplate, @response.template.exception.class + assert_kind_of ActionView::MissingTemplate, @response.template.instance_eval { @exception } end end -- GitLab