From 66a4585f8830d8f37e62a63df3d095b6284b2a35 Mon Sep 17 00:00:00 2001 From: Yehuda Katz + Carl Lerche Date: Tue, 1 Sep 2009 15:54:29 -0700 Subject: Fix the */* with Net::HTTP bug [#3100 state:resolved] --- actionpack/test/controller/view_paths_test.rb | 2 +- actionpack/test/lib/fixture_template.rb | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) (limited to 'actionpack/test') 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 -- cgit v1.2.3