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

Add assert_rbi_exists? to support wildcard #614

Closed
KaanOzkan opened this issue Oct 15, 2024 · 1 comment
Closed

Add assert_rbi_exists? to support wildcard #614

KaanOzkan opened this issue Oct 15, 2024 · 1 comment

Comments

@KaanOzkan
Copy link
Contributor

KaanOzkan commented Oct 15, 2024

Using project assertions with RBI's is common in Tapioca and allowing assert_rbi_exists?("sorbet/rbi/gems/foo@*.rbi") would be beneficial so that we can omit the version number.

Maybe we can first check if the given string is a file. If not we can also search the directory with the given path which will support the wildcard out of the box Dir["sorbet/rbi/gems/foo@*.rbi"]

I thought this is mostly for RBIs so I'm suggesting a new method but we could also modify the existing assert_project_file_exist.
Related PR where we had to update an assertion Shopify/tapioca#2046

@Morriar
Copy link
Collaborator

Morriar commented Oct 15, 2024

This may be better suited for https://github.com/Shopify/tapioca/blob/main/spec/spec_with_project.rb#L87? This is where we define all the custom assertions used in Tapioca test suite.

@KaanOzkan KaanOzkan closed this as not planned Won't fix, can't repro, duplicate, stale Oct 16, 2024
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

No branches or pull requests

2 participants