Skip to content
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

Failing test to illustrate a problem with how TLDR gathers tests #6

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

searls
Copy link
Collaborator

@searls searls commented Oct 14, 2023

TLDR gathers tests by recursively looking for descendants of the TLDR class. If you have multiple Rake tasks that look in different places for tests, that's all well and good, but the first Rake task that runs (because it's all in the same process) will load all of its tests and the second Rake task will, of course, find them, because they're still defined.

Decoupling path from test definition is generally good but in this particular case it is not fantastic. Makes me wonder if we should go back to shelling out from the Rake task to avoid pollution or if there's some other way to segregate things without messing up any other valid use cases

This PR just pushes up a failing test.

TLDR gathers tests by recursively looking for descendants of the TLDR class. If you have multiple Rake tasks that look in different places for tests, that's all well and good, but the first Rake task that runs (because it's all in the same process) will load all of its tests and the second Rake task will, of course, find them, because they're still defined.

Decoupling path from test definition is generally good but in this particular case it is not fantastic. Makes me wonder if we should go back to shelling out from the Rake task to avoid pollution or if there's some other way to segregate things without messing up any other valid use cases
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant