Defect #26504
closedRails 5 unit and functional tests
0%
Description
On trunk r16872, "rake test:units" and "rake test:functionals" cannot run.
Rails 5 changes directories.
- test/unit -> test/models
- test/functional -> test/controllers
http://guides.rubyonrails.org/testing.html#rails-sets-up-for-testing-from-the-word-go
Files
Updated by Jean-Philippe Lang over 7 years ago
Should we move the tests to the new models, controllers... folders?
Updated by Toshi MARUYAMA over 7 years ago
Jean-Philippe Lang wrote:
Should we move the tests to the new models, controllers... folders?
I don't know.
But Japanese document says
- rake test:units -> run in test/models test/helpers, and test/unit
- rake test:functionals -> run in test/controllers, test/mailers, and test/functional
Updated by Toshi MARUYAMA over 7 years ago
Updated by Jeremy Bailey about 7 years ago
Should we move the tests to the new models, controllers... folders?
I don't know either, but I wanted to help out by finding the cause of the documentation discrepancy.
I cannot find this part in English document .
It looks like the localized Japanese version of the Rails guide is out of date. This table appeared in the English 4.1 version but was removed from the English back on March 29th, 2015.
Maybe this overview of changes to testing in Rails 5 will be helpful too.
It appears that rake test
should now be bin/rails test
in Rails 5. I'm not a Rails developer, just wanted to do a little detective work to move this forward as a user looking forward to using Redmine 4 eventually!
Updated by Jean-Philippe Lang about 6 years ago
- Target version deleted (
4.0.0)
Changes not required and would make merging test changes between branches less easy.
Updated by Toshi MARUYAMA over 4 years ago
- File issue-26504.diff issue-26504.diff added
- Status changed from New to Closed
I have confirmed on r19683.
- "rake test:units" catches failures in test/unit and test/helpers
- "rake test:functionals" catches failures in test/functional