This project is archived and is in readonly mode.
Reorganize app tests
Reported by Jeremy Kemper | August 15th, 2009 @ 08:30 PM | in 3.x
test/units => test/models test/units/helpers => test/helpers test/functionals => test/controllers test/integration => test/controllers (tentative)
Comments and changes to this ticket
-
David Trasbo August 19th, 2009 @ 06:34 PM
The attached patch includes:
- test_unit generators updates.
- testing rake task updates.
- update:test_directory task for backwards compatibility.
-
Jeremy Kemper August 19th, 2009 @ 07:12 PM
- State changed from new to open
- Assigned user set to Jeremy Kemper
David - awesome!
-
Rizwan Reza March 28th, 2010 @ 11:49 AM
- Tag set to 3.0
David, the patch fails. Can you provide an updated patch? Thanks.
-
Yehuda Katz (wycats) March 28th, 2010 @ 10:05 PM
- State changed from open to incomplete
-
Rizwan Reza March 29th, 2010 @ 06:39 AM
- State changed from incomplete to resolved
(from [a0dc6755db71b33aebccdb95fd0dd7097c934c04]) Reorganized app/test directory. [#3057 state:resolved]
Run 'rake update:test_directory' to reorganize your already generated apps.
test/functional -> test/controllers
test/functional -> test/controllers
test/unit/helpers -> test/helpers
test/unit/*/_observer_test.rb -> test/observers
test/unit -> test/models
http://github.com/rails/rails/commit/a0dc6755db71b33aebccdb95fd0dd7... -
Repository March 29th, 2010 @ 05:37 PM
(from [9a865ee25ea01c68015b46e69ca0589f0024a0d5]) Revert "Reorganized app/test directory. [#3057 state:resolved]"
This reverts commit a0dc6755db71b33aebccdb95fd0dd7097c934c04.
http://github.com/rails/rails/commit/9a865ee25ea01c68015b46e69ca058... -
José Valim March 29th, 2010 @ 06:00 PM
- State changed from resolved to open
Thanks for the patch Rizwan! But there are a few rough edges:
1) Integration tests still should stay on test/integrations.
2) Mailer tests should be in test/mailers, not in test/controllers.
3) Observers are models test, so they should still be under test/models.We should also keep rake test:unit => ["test:models", "test:helpers"] and rake test:functionals => ["test:controllers", "test:mailers"] for a while.
But it still may change. Hold on before working in a new patch, I will drop another comment after I confirm this. :)
-
Dan Pickett May 15th, 2010 @ 01:58 AM
- Tag changed from 3.0 to 3.0, bugmash
Can someone build off Rizwan's patch to fill in the rough edges Jose highlighted?
-
Rizwan Reza May 15th, 2010 @ 02:57 PM
I would suggest asking José before working on this one, as José has pointed out.
-
Fabio Kreusch May 15th, 2010 @ 07:08 PM
Here is an updated patch taking in consideration José appointments.
I was not able to ask him today for new toughts, but here is the new patch version. -
Jeremy Kemper May 15th, 2010 @ 07:29 PM
Do tests still run with deprecation warning if you haven't reorganized them?
-
Casey Dreier May 16th, 2010 @ 08:43 PM
+1 Verified patch with master.
Tests pass, and the upgrade script moves tests in old test/unit and test/functional to test/models and test/controllers without any trouble.
I made two minor change to the exsiting patch: I moved the deprecated rake test tasks to the bottom of the script, and added a conditional check to not add the tasks if the old directory structures no longer exist. It seemed unnecessary to preserve them if they were no longer relevant and didn't execute any tests.
-
Rizwan Reza May 19th, 2010 @ 12:44 PM
- no changes were found...
-
Simon Jefford May 19th, 2010 @ 03:19 PM
I applied Casey's patch OK.
There's one problem that I can see - "rake test" still tries to run the deprecated tasks. I've uploaded a version of the patch which doesn't do that.
-
Fabio Kreusch May 19th, 2010 @ 04:01 PM
It was running the deprecated tasks on 'rake test' with the warning so that people could still use 'rake test' even while they have not yet moved to the new structure.
I have made it that way because of Jeremy's note:Jeremy Kemper
May 15th, 2010 @ 07:29 PM
Do tests still run with deprecation warning if you haven't reorganized them? -
Simon Jefford May 19th, 2010 @ 04:30 PM
Hmm, I see what you mean. The problem is it falls over when you're using the new structure (because Casey's patch removes the deprecated tests when the corresponding directories are absent.)
-
Rohit Arondekar August 3rd, 2010 @ 08:06 AM
- Milestone set to 3.x
- Importance changed from to Low
Changing milestone, as this was not part of the RC.
Also any updates here?
-
rails April 5th, 2011 @ 01:00 AM
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.
-
rails April 5th, 2011 @ 01:00 AM
- State changed from open to stale
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>
People watching this ticket
Attachments
Referenced by
- 3057 Reorganize app tests (from [a0dc6755db71b33aebccdb95fd0dd7097c934c04]) Reorgan...
- 3057 Reorganize app tests (from [9a865ee25ea01c68015b46e69ca0589f0024a0d5]) Revert ...