aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/template/lookup_context_test.rb
diff options
context:
space:
mode:
authorBurke Libbey <burke@burkelibbey.org>2011-05-06 14:02:31 -0500
committerBurke Libbey <burke@burkelibbey.org>2011-05-06 14:02:31 -0500
commit156039c4cf7f0e0ad697443b121b46d3fe57d801 (patch)
tree6197ccd5d9d98abe65f0719817180617d962856e /actionpack/test/template/lookup_context_test.rb
parent30d49d001e9060d1898722dfa43b61b7daf90cd4 (diff)
downloadrails-156039c4cf7f0e0ad697443b121b46d3fe57d801.tar.gz
rails-156039c4cf7f0e0ad697443b121b46d3fe57d801.tar.bz2
rails-156039c4cf7f0e0ad697443b121b46d3fe57d801.zip
Added a test for MissingTemplate change, and changed to use Array.wrap() as
requested by josevalim.
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 5fb1fdc044..94af97ee11 100644
--- a/actionpack/test/template/lookup_context_test.rb
+++ b/actionpack/test/template/lookup_context_test.rb
@@ -251,4 +251,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