diff options
author | Yehuda Katz + Carl Lerche <ykatz+clerche@engineyard.com> | 2009-05-20 15:33:08 -0700 |
---|---|---|
committer | Yehuda Katz + Carl Lerche <ykatz+clerche@engineyard.com> | 2009-05-20 15:34:26 -0700 |
commit | 01f032f256f96f65e154061b582fbb4b32e4a692 (patch) | |
tree | 9d9d0deeeec9a8c86c0b85c55c3ed13385f55f49 /actionpack/test/controller/mime_responds_test.rb | |
parent | c03b0ca7eb7e73587005e1440bf90cd01ed10aa5 (diff) | |
download | rails-01f032f256f96f65e154061b582fbb4b32e4a692.tar.gz rails-01f032f256f96f65e154061b582fbb4b32e4a692.tar.bz2 rails-01f032f256f96f65e154061b582fbb4b32e4a692.zip |
Added responds_to to new base.
Diffstat (limited to 'actionpack/test/controller/mime_responds_test.rb')
-rw-r--r-- | actionpack/test/controller/mime_responds_test.rb | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/actionpack/test/controller/mime_responds_test.rb b/actionpack/test/controller/mime_responds_test.rb index 7cd5145a2f..3b8babb84c 100644 --- a/actionpack/test/controller/mime_responds_test.rb +++ b/actionpack/test/controller/mime_responds_test.rb @@ -437,7 +437,7 @@ class MimeControllerTest < ActionController::TestCase @controller.instance_eval do def render(*args) unless args.empty? - @action = args.first[:action] + @action = args.first[:action] || action_name end response.body = "#{@action} - #{@template.formats}" end @@ -490,14 +490,15 @@ class PostController < AbstractPostController end end - protected - def with_iphone - Mime::Type.register_alias("text/html", :iphone) - request.format = "iphone" if request.env["HTTP_ACCEPT"] == "text/iphone" - yield - ensure - Mime.module_eval { remove_const :IPHONE if const_defined?(:IPHONE) } - end +protected + + def with_iphone + Mime::Type.register_alias("text/html", :iphone) + request.format = "iphone" if request.env["HTTP_ACCEPT"] == "text/iphone" + yield + ensure + Mime.module_eval { remove_const :IPHONE if const_defined?(:IPHONE) } + end end class SuperPostController < PostController @@ -509,6 +510,11 @@ class SuperPostController < PostController end end +if ENV["new_base"] + PostController._write_layout_method + SuperPostController._write_layout_method +end + class MimeControllerLayoutsTest < ActionController::TestCase tests PostController |