-
-
Notifications
You must be signed in to change notification settings - Fork 251
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
docs: explain dir and tag name conflict; #535
base: master
Are you sure you want to change the base?
docs: explain dir and tag name conflict; #535
Conversation
✔️ Deploy Preview for crystal-book ready! 🔨 Explore the source changes: 2440873 🔍 Inspect the deploy log: https://app.netlify.com/sites/crystal-book/deploys/61119e6249558000099ca752 😎 Browse the preview: https://deploy-preview-535--crystal-book.netlify.app/guides/testing |
@@ -146,6 +147,9 @@ Tagging an example group (`describe` or `context`) extends to all of the contain | |||
|
|||
Multiple tags can be specified by giving an [`Enumerable`](https://crystal-lang.org/api/latest/Enumerable.html), such as [`Array`](https://crystal-lang.org/api/latest/Array.html) or [`Set`](https://crystal-lang.org/api/latest/Set.html). | |||
|
|||
Be sure to use `--tag="my-tag"` syntax when there is a directory name that matches your tag name in your project or else they will be parsed as directories instead of tag filters. For example, if you have some tests that run in a Terraform environment and you have put all of your terraform scripts in `terraform/example.tf` and have also tagged some tests as `tags: "terraform"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think "Terraform" has enough relevance here to be used without any introduction
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for the review.
I often find concrete examples useful in docs when dealing with corner cases, but i can definitely clean it up when I'm back from vacation.
Unless it is decided this behavior is actually a crystal bug we should fix.
Is there a bug opened in Crystal issues for this? It feels weird to document this when it's possible we can just fix it. I'd argue that code is "stealing" the option from the --tags option, which is a bug. The same would happen possibly with other options that take values as well. |
i didn't open a bug in Crystal, but I certainly can.
…On Fri, Aug 13, 2021, 12:10 Jason Frey ***@***.***> wrote:
Is there a bug opened in Crystal issues for this? It feels weird to
document this when it's possible we can just fix it.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#535 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAIKHAVUN3K5IHFRCT3SXY3T4VN3FANCNFSM5B23ESOQ>
.
|
Yes, let's discuss this first in the Crystal repo. Initial diagnosis: https://libera.irclog.whitequark.org/crystal-lang/2021-08-09#30646868; |
because of this
if there is a directory with the same name as your tagged tests, your tests will exit with status code zero and not actually run the tests tagged when using the currently documented
--tag <name>
syntax.