aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/lib
diff options
context:
space:
mode:
authorMikel Lindsaar <raasdnil@gmail.com>2010-03-11 22:05:15 +1100
committerMikel Lindsaar <raasdnil@gmail.com>2010-03-11 22:05:15 +1100
commitf5774e3e3f70a3acfa559b9ff889e9417fb71d4b (patch)
treee738112994d40d6c3792065da80bddfa7439467b /actionpack/test/lib
parentcefe723e285f20d1f2a33f67da03348568f7e0b0 (diff)
parent073852dff0b48296a9a184f94e722183334f3c4c (diff)
downloadrails-f5774e3e3f70a3acfa559b9ff889e9417fb71d4b.tar.gz
rails-f5774e3e3f70a3acfa559b9ff889e9417fb71d4b.tar.bz2
rails-f5774e3e3f70a3acfa559b9ff889e9417fb71d4b.zip
Merge branch 'master' of git://github.com/rails/rails
Diffstat (limited to 'actionpack/test/lib')
-rw-r--r--actionpack/test/lib/fixture_template.rb12
1 files changed, 7 insertions, 5 deletions
diff --git a/actionpack/test/lib/fixture_template.rb b/actionpack/test/lib/fixture_template.rb
index 6b9e7c5270..d287fae470 100644
--- a/actionpack/test/lib/fixture_template.rb
+++ b/actionpack/test/lib/fixture_template.rb
@@ -1,13 +1,13 @@
module ActionView #:nodoc:
class FixtureResolver < PathResolver
- def initialize(hash = {}, options = {})
- super(options)
+ def initialize(hash = {})
+ super()
@hash = hash
end
private
- def query(path, exts)
+ def query(partial, path, exts)
query = Regexp.escape(path)
exts.each do |ext|
query << '(?:' << ext.map {|e| e && Regexp.escape(".#{e}") }.join('|') << ')'
@@ -15,9 +15,11 @@ module ActionView #:nodoc:
templates = []
@hash.select { |k,v| k =~ /^#{query}$/ }.each do |path, source|
- templates << Template.new(source, path, *path_to_details(path))
+ handler, format = extract_handler_and_format(path)
+ templates << Template.new(source, path, handler,
+ :partial => partial, :virtual_path => path, :format => format)
end
- templates.sort_by {|t| -t.details.values.compact.size }
+ templates.sort_by {|t| -t.formats.size }
end
end