Permalink
Browse files

Use instance_eval instead of adding an accessor to the class

  • Loading branch information...
1 parent 35fa007 commit c90572e3ab65e02933d204747645d0de83b00481 @jeremy jeremy committed Jan 7, 2009
Showing with 1 addition and 2 deletions.
  1. +1 −2 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

0 comments on commit c90572e

Please sign in to comment.