diff options
Diffstat (limited to 'actionpack/test/lib/fixture_template.rb')
-rw-r--r-- | actionpack/test/lib/fixture_template.rb | 41 |
1 files changed, 2 insertions, 39 deletions
diff --git a/actionpack/test/lib/fixture_template.rb b/actionpack/test/lib/fixture_template.rb index 59fb6819ed..5cf414a1c6 100644 --- a/actionpack/test/lib/fixture_template.rb +++ b/actionpack/test/lib/fixture_template.rb @@ -1,6 +1,5 @@ module ActionView #:nodoc: -class Template - class FixturePath < Path + class FixtureResolver < Resolver def initialize(hash = {}, options = {}) super(options) @hash = hash @@ -22,7 +21,7 @@ class Template def formats_regexp @formats_regexp ||= begin - formats = Mime::SET.map { |m| m.symbol } + formats = Mime::SET.symbols '(?:' + formats.map { |l| "\\.#{Regexp.escape(l.to_s)}" }.join('|') + ')?' end end @@ -65,40 +64,4 @@ class Template end end end - - - # class FixtureTemplate < Template - # class FixturePath < Template::Path - # def initialize(hash = {}) - # @hash = {} - # - # hash.each do |k, v| - # @hash[k.sub(/\.\w+$/, '')] = FixtureTemplate.new(v, k.split("/").last, self) - # end - # - # super("fixtures://root") - # end - # - # def find_template(path) - # @hash[path] - # end - # end - # - # def initialize(body, *args) - # @body = body - # super(*args) - # end - # - # def source - # @body - # end - # - # private - # - # def find_full_path(path, load_paths) - # return '/', path - # end - # - # end -end end
\ No newline at end of file |