aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/lib/fixture_template.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/test/lib/fixture_template.rb')
-rw-r--r--actionpack/test/lib/fixture_template.rb9
1 files changed, 6 insertions, 3 deletions
diff --git a/actionpack/test/lib/fixture_template.rb b/actionpack/test/lib/fixture_template.rb
index 8da92180d1..9a9abb691d 100644
--- a/actionpack/test/lib/fixture_template.rb
+++ b/actionpack/test/lib/fixture_template.rb
@@ -38,10 +38,13 @@ module ActionView #:nodoc:
extensions = ""
[:locales, :formats].each do |k|
- extensions << if exts = details[k]
- '(?:' + exts.map {|e| "\\.#{Regexp.escape(e.to_s)}"}.join('|') + ')?'
+ # TODO: OMG NO
+ if details[k] == [:"*/*"]
+ extensions << formats_regexp if k == :formats
+ elsif exts = details[k]
+ extensions << '(?:' + exts.map {|e| "\\.#{Regexp.escape(e.to_s)}"}.join('|') + ')?'
else
- k == :formats ? formats_regexp : ''
+ extensions << formats_regexp if k == :formats
end
end