This project is archived and is in readonly mode.
NoMethodError on formats= when using ActionController::TestCase to test a direct subclass of ActionController::Metal
-
David Chelimsky
- Assigned user set to José Valim
-
Santiago Pastorino
- Milestone cleared.
- State changed from new to open
- Assigned user changed from José Valim to Santiago Pastorino
- Importance changed from to Low
Hey David can you add a test case
-
Rohit Arondekar
I'm sorry if this is a silly question, but why would you want to call get :index in a functional test?
From what I gather, the docs say that AC::Metal is for obtaining Rack app for an action.
ActionController::Metal provides an #action method that returns a valid Rack application for a given action.
From the AC::Metal docs
Also the line that's causing the error is in actionpack/lib/action_controller/metal/rendering:10
def process_action(*) #:nodoc: self.formats = request.formats.map { |x| x.to_sym } super endBut in the whole of Actionpack there is only one formats= method defined in lib/action_view/lookup_context.rb so why was this line added in Metal?
Again I apologize if I have missed something obvious.
-
Ryan Bigg
Automatic cleanup of spam.
-
Ryan Bigg
Automatic cleanup of spam.
-
Jeff Kreeftmeijer
Automatic cleanup of spam.
-
Repository
- State changed from open to committed
(from [2382667955df08599cb5df7bf3ef135817093d74]) Fix problems trying to functional test AC::Metal controllers
[#5393 NoMethodError on formats= when using ActionController::TestCase to test a dir... state:committed] https://github.com/rails/rails/commit/2382667955df08599cb5df7bf3ef1...
-
Santiago Pastorino
- State changed from committed to open
- Milestone changed from 3.0.2 to 3.1
-
Jeff Kreeftmeijer
Automatic cleanup of spam.
-
Santiago Pastorino
This issue has been automatically marked as stale because it has not been commented on for at least three months.
The resources of the Rails core team are limited, and so we are asking for your help. If you can still reproduce this error on the 3-0-stable branch or on master, please reply with all of the information you have about it and add "[state:open]" to your comment. This will reopen the ticket for review. Likewise, if you feel that this is a very important feature for Rails to include, please reply with your explanation so we can consider it.
Thank you for all your contributions, and we hope you will understand this step to focus our efforts where they are most helpful.
-
Santiago Pastorino
- State changed from open to stale