-
Notifications
You must be signed in to change notification settings - Fork 508
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
More inteligent running of test tasks #1981
base: master
Are you sure you want to change the base?
Conversation
This generates test tasks based on the presence of test files and groups tasks by subapp (apps named "app" are ignored). Previously, everything under the test directory was added as an individual test task, which resulted in N invocations of `rake test`, often times on directories that had no tests (e.g., support or factory files). Additional changes, note that these should only affect new projects: 1. {test,spec}/*.rake is no longer generated. Instead, a modification to the project's Rakefile is made to call PadrinoTasks.use(:xxx). This seems to be more in line with Padrino methodology (starting at v0.11 I think). 2. The default rake task will be the test (or spec) task.
Let me elaborate with an example. Here,
|
I love your approach. Thanks for the patch! |
It looks like it conflicts with this feature request: #765 |
Is there any interest in merging all or part of this? #765 has not been merged and current test behavior has two issues: one small yet annoying and the other somewhat big.
|
Related to #1937 and #1979.
Let me know what you think. I do have some issues with things like this. I just piggybacked on it as poor man's way to avoid two sets of test tasks but, in the case of the DB tasks, why is it needed? Shouldn't this sort of stuff be handled by adding the
:environment
task as a prerequisite? Anywayz...For minitest, since the spec format is being used (but also see #1848), I think the task should look for
*_spec.rb
files and maybe the same goes for bacon, but I left them as is to minimize future impact.In summary:
This generates test tasks based on the presence of test files
and groups tasks by subapp (apps named "app" are ignored).
Previously, everything under the test directory was added
as an individual test task, which resulted in N invocations
of
rake test
, often times on directories that had no tests (e.g.,support or factory files).
Additional changes, note that these should only affect new projects:
{test,spec}/*.rake
is no longer generated. Instead, a modification tothe project's Rakefile is made to call
PadrinoTasks.use(:xxx)
. Thisseems to be more in line with Padrino methodology (starting at v0.11 I
think).