More inteligent running of test tasks #1981
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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).