diff options
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/abstract_unit.rb | 2 | ||||
-rw-r--r-- | actionpack/test/controller/layout_test.rb | 2 | ||||
-rw-r--r-- | actionpack/test/lib/fixture_template.rb | 29 |
3 files changed, 1 insertions, 32 deletions
diff --git a/actionpack/test/abstract_unit.rb b/actionpack/test/abstract_unit.rb index f3ff258016..89ba0990f1 100644 --- a/actionpack/test/abstract_unit.rb +++ b/actionpack/test/abstract_unit.rb @@ -16,8 +16,8 @@ require 'test/unit' require 'abstract_controller' require 'action_controller' require 'action_view' +require 'action_view/testing/resolvers' require 'action_dispatch' -require 'fixture_template' require 'active_support/dependencies' require 'active_model' diff --git a/actionpack/test/controller/layout_test.rb b/actionpack/test/controller/layout_test.rb index 48be7571ea..165c61ffad 100644 --- a/actionpack/test/controller/layout_test.rb +++ b/actionpack/test/controller/layout_test.rb @@ -10,8 +10,6 @@ ActionView::Template::register_template_handler :mab, ActionController::Base.view_paths = [ File.dirname(__FILE__) + '/../fixtures/layout_tests/' ] -require "fixture_template" - class LayoutTest < ActionController::Base def self.controller_path; 'views' end def self._implied_layout_name; to_s.underscore.gsub(/_controller$/, '') ; end diff --git a/actionpack/test/lib/fixture_template.rb b/actionpack/test/lib/fixture_template.rb deleted file mode 100644 index b49ccd39ca..0000000000 --- a/actionpack/test/lib/fixture_template.rb +++ /dev/null @@ -1,29 +0,0 @@ -module ActionView #:nodoc: - class FixtureResolver < PathResolver - attr_reader :hash - - def initialize(hash = {}) - super() - @hash = hash - end - - private - - def query(path, exts, formats) - query = Regexp.escape(path) - exts.each do |ext| - query << '(' << ext.map {|e| e && Regexp.escape(".#{e}") }.join('|') << '|)' - end - - templates = [] - @hash.select { |k,v| k =~ /^#{query}$/ }.each do |path, source| - handler, format = extract_handler_and_format(path, formats) - templates << Template.new(source, path, handler, - :virtual_path => path, :format => format) - end - - templates.sort_by {|t| -t.identifier.match(/^#{query}$/).captures.reject(&:blank?).size } - end - - end -end
\ No newline at end of file |