aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/test/template
diff options
context:
space:
mode:
authorJohn Hawthorn <john@hawthorn.email>2019-03-17 23:53:39 -0700
committerJohn Hawthorn <john@hawthorn.email>2019-03-26 14:19:31 -0700
commit573e361a3ccb2cc716ed028d66da8af144bc0db2 (patch)
tree6feef01629119fa530e52ac54eee3960d0de82df /actionview/test/template
parentc0f29ab75ee7ce810c0970f359a54037ee84adc3 (diff)
downloadrails-573e361a3ccb2cc716ed028d66da8af144bc0db2.tar.gz
rails-573e361a3ccb2cc716ed028d66da8af144bc0db2.tar.bz2
rails-573e361a3ccb2cc716ed028d66da8af144bc0db2.zip
Deprecate custom patterns for PathResolver
Custom glob patterns tie the implementation (Using Dir.glob) to the API we provide. It also doesn't really work. extract_handler_and_format_and_variant expects the handler, format, and variant to be at the end of the template path, and in the same order as they are in the default pattern. This deprecates specifying a custom path for FileSystemResolver and removes the pattern argument of OptimizedFileSystemResolver#initialize, which does not work with a custom pattern.
Diffstat (limited to 'actionview/test/template')
-rw-r--r--actionview/test/template/resolver_patterns_test.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/actionview/test/template/resolver_patterns_test.rb b/actionview/test/template/resolver_patterns_test.rb
index 8122de779f..22815c8dbe 100644
--- a/actionview/test/template/resolver_patterns_test.rb
+++ b/actionview/test/template/resolver_patterns_test.rb
@@ -6,7 +6,10 @@ class ResolverPatternsTest < ActiveSupport::TestCase
def setup
path = File.expand_path("../fixtures", __dir__)
pattern = ":prefix/{:formats/,}:action{.:formats,}{+:variants,}{.:handlers,}"
- @resolver = ActionView::FileSystemResolver.new(path, pattern)
+
+ assert_deprecated do
+ @resolver = ActionView::FileSystemResolver.new(path, pattern)
+ end
end
def test_should_return_empty_list_for_unknown_path