diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-12-16 18:35:38 -0200 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-12-16 18:35:38 -0200 |
commit | e745ae297fb803b150e3e129e2c6e34c4d31f73a (patch) | |
tree | cde889bff5b9f17bc554b8cddf4c555e5ee495b5 /actionpack/lib/action_controller | |
parent | e91b182b96beaf7ca39352dc99bc250e023c2c9a (diff) | |
parent | 7ff31feb14b7e8ffe05bb591fffd2ac29383d5a4 (diff) | |
download | rails-e745ae297fb803b150e3e129e2c6e34c4d31f73a.tar.gz rails-e745ae297fb803b150e3e129e2c6e34c4d31f73a.tar.bz2 rails-e745ae297fb803b150e3e129e2c6e34c4d31f73a.zip |
Merge pull request #17995 from jethroo/fix/assert_template_with_unsupported_layout_type
assert template should raise ArgumentError for unsupported layout types
Diffstat (limited to 'actionpack/lib/action_controller')
-rw-r--r-- | actionpack/lib/action_controller/test_case.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/actionpack/lib/action_controller/test_case.rb b/actionpack/lib/action_controller/test_case.rb index cd92962dc3..b9172f8fa3 100644 --- a/actionpack/lib/action_controller/test_case.rb +++ b/actionpack/lib/action_controller/test_case.rb @@ -145,6 +145,8 @@ module ActionController assert(@_layouts.keys.any? {|l| l =~ expected_layout }, msg) when nil, false assert(@_layouts.empty?, msg) + else + raise ArgumentError, "assert_template only accepts a String, Symbol, Regexp, nil or false for :layout" end end |