Fixed new_base tests on ruby 1.9

上级 c4a61092
...@@ -4,8 +4,8 @@ module Renderer ...@@ -4,8 +4,8 @@ module Renderer
depends_on AbstractController::Renderer depends_on AbstractController::Renderer
def initialize(*) def process_action(*)
self.formats = [:html] self.formats = request.formats.map {|x| x.to_sym}
super super
end end
......
# Build list of Mime types for HTTP responses # Build list of Mime types for HTTP responses
# http://www.iana.org/assignments/media-types/ # http://www.iana.org/assignments/media-types/
Mime::Type.register "text/html", :html, %w( application/xhtml+xml ), %w( xhtml )
Mime::Type.register "*/*", :all Mime::Type.register "*/*", :all
Mime::Type.register "text/plain", :text, [], %w(txt) Mime::Type.register "text/plain", :text, [], %w(txt)
Mime::Type.register "text/html", :html, %w( application/xhtml+xml ), %w( xhtml )
Mime::Type.register "text/javascript", :js, %w( application/javascript application/x-javascript ) Mime::Type.register "text/javascript", :js, %w( application/javascript application/x-javascript )
Mime::Type.register "text/css", :css Mime::Type.register "text/css", :css
Mime::Type.register "text/calendar", :ics Mime::Type.register "text/calendar", :ics
......
...@@ -46,7 +46,7 @@ def details_to_regexp(name, details, prefix, partial) ...@@ -46,7 +46,7 @@ def details_to_regexp(name, details, prefix, partial)
end end
end end
%r'#{Regexp.escape(path)}#{extensions}#{handler_regexp}' %r'^#{Regexp.escape(path)}#{extensions}#{handler_regexp}$'
end end
# TODO: fix me # TODO: fix me
......
...@@ -12,7 +12,7 @@ def without_layout ...@@ -12,7 +12,7 @@ def without_layout
end end
def with_layout def with_layout
render :action => "base", :layout => "etag" render :action => "base", :layout => "etags"
end end
end end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册