This project is archived and is in readonly mode.
fixture_file_upload no longer available in Tests by default
-
grosser.michael+lighthouse (at gmail)
same prblem here, thanks for your solution :)
-
josh
- State changed from new to invalid
You need to either inherit from ActiveSupport::TestCase or ActionController::TestCase to get these helpers.
-
Kieran P
- Assigned user set to josh
I was. That's the weird thing. I updated all our tests to inherit from the correct classes that a new 2.3 app sets up for scaffold'd data. (i.e. the two classes you mentioned).
The method was not available until I added the include line.
-
josh
weird
module ActionController class TestCase < ActiveSupport::TestCase include TestProcess -
ragaskar
I encountered the same error. Using rspec. Adding 'include ActionController::TestProcess' to my spec_helper fixed it for me as well.
-
Kieran P
Joshua, to be more precise, it's ActiveSupport::TestCase that doesn't have this method included automatically (unit tests). The functionals, which use ActionController::TestCase don't have this problem (because as you mentioned, it includes TestProcess). Thus, why doing this fixes it:
class ActiveSupport::TestCase include ActionController::TestProcess endI'm attaching a diff which resolves this issue within Rails.
-
josh
- State changed from invalid to open
- Milestone cleared.
-
Jeremy Kemper
- State changed from open to invalid
This is a controller concern, so it's part of ActionController::TestCase
-
ragaskar
So my problems were rspec-releated: apparently rspec does not load controller behaviors unless the spec file is in spec/controllers. Moving all tests to spec/controllers allowed me to pull the include workaround out of my spec_helper. My specs were converted from testunit and had some outdated naming conventions, I guess.
