aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/template/lookup_context_test.rb
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2011-05-08 03:35:14 -0700
committerJosé Valim <jose.valim@gmail.com>2011-05-08 03:35:14 -0700
commit843cab6f98e2d6c99bc913bd2aade6c848e4ce8d (patch)
tree3725e7e1a0575c59476c8e35d5b0cbe7fd5aa1a3 /actionpack/test/template/lookup_context_test.rb
parent30db3a82f653e7d7215e41bec525932cf5b17de1 (diff)
parent06671c37de93702323ee281aedc4023bb8d7cdb6 (diff)
downloadrails-843cab6f98e2d6c99bc913bd2aade6c848e4ce8d.tar.gz
rails-843cab6f98e2d6c99bc913bd2aade6c848e4ce8d.tar.bz2
rails-843cab6f98e2d6c99bc913bd2aade6c848e4ce8d.zip
Merge pull request #420 from burke/master
Accept single prefix in ActionView::MissingTemplate#initialize
Diffstat (limited to 'actionpack/test/template/lookup_context_test.rb')
-rw-r--r--actionpack/test/template/lookup_context_test.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/actionpack/test/template/lookup_context_test.rb b/actionpack/test/template/lookup_context_test.rb
index f34a40795a..47b70f05ab 100644
--- a/actionpack/test/template/lookup_context_test.rb
+++ b/actionpack/test/template/lookup_context_test.rb
@@ -256,4 +256,13 @@ class TestMissingTemplate < ActiveSupport::TestCase
end
assert_match %r{Missing partial parent/foo, child/foo with .* Searched in:\n \* "/Path/to/views"\n}, e.message
end
+
+ test "if a single prefix is passed as a string and the lookup fails, MissingTemplate accepts it" do
+ e = assert_raise ActionView::MissingTemplate do
+ details = {:handlers=>[], :formats=>[], :locale=>[]}
+ @lookup_context.view_paths.find("foo", "parent", true, details)
+ end
+ assert_match %r{Missing partial parent/foo with .* Searched in:\n \* "/Path/to/views"\n}, e.message
+ end
+
end