From 1b844e4bf4462609c6f4f58950ca05cec5cb3929 Mon Sep 17 00:00:00 2001 From: Yehuda Katz + Carl Lerche Date: Tue, 23 Jun 2009 14:45:27 -0700 Subject: Passes in 1.9 --- actionpack/test/lib/fixture_template.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'actionpack/test') diff --git a/actionpack/test/lib/fixture_template.rb b/actionpack/test/lib/fixture_template.rb index 5cf414a1c6..ee526b5de5 100644 --- a/actionpack/test/lib/fixture_template.rb +++ b/actionpack/test/lib/fixture_template.rb @@ -12,7 +12,7 @@ module ActionView #:nodoc: @hash.select { |k,v| k =~ regexp }.each do |path, source| templates << Template.new(source, path, *path_to_details(path)) end - templates + templates.sort_by {|t| -t.details.values.compact.size } end end end @@ -44,7 +44,7 @@ module ActionView #:nodoc: k == :formats ? formats_regexp : '' end end - + %r'^#{Regexp.escape(path)}#{extensions}#{handler_regexp}$' end @@ -52,7 +52,7 @@ module ActionView #:nodoc: # :api: plugin def path_to_details(path) # [:erb, :format => :html, :locale => :en, :partial => true/false] - if m = path.match(%r'(_)?[\w-]+(\.[\w-]+)*\.(\w+)$') + if m = path.match(%r'(_)?[\w-]+((?:\.[\w-]+)*)\.(\w+)$') partial = m[1] == '_' details = (m[2]||"").split('.').reject { |e| e.empty? } handler = Template.handler_class_for_extension(m[3]) -- cgit v1.2.3