aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/test')
-rw-r--r--actionpack/test/controller/view_paths_test.rb2
-rw-r--r--actionpack/test/lib/fixture_template.rb9
2 files changed, 7 insertions, 4 deletions
diff --git a/actionpack/test/controller/view_paths_test.rb b/actionpack/test/controller/view_paths_test.rb
index c732d1c910..05d2c8407c 100644
--- a/actionpack/test/controller/view_paths_test.rb
+++ b/actionpack/test/controller/view_paths_test.rb
@@ -43,7 +43,7 @@ class ViewLoadPathsTest < ActionController::TestCase
end
def expand(array)
- array.map {|x| File.expand_path(x)}
+ array.map {|x| File.expand_path(x.to_s)}
end
def assert_paths(*paths)
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