mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
Use instance_eval instead of adding an accessor to the class
This commit is contained in:
committed by
Yehuda Katz
parent
cf09fa74f7
commit
e3be52c1dd
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user