Permalink
Browse files

Use instance_eval instead of adding an accessor to the class

  • Loading branch information...
1 parent cf09fa7 commit e3be52c1dd071b044de2c3cc3641f644888ded34 @jeremy jeremy committed with wycats 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 e3be52c

Please sign in to comment.