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

Behavior in a subdirectory #4

Closed
ursm opened this issue Nov 2, 2024 · 3 comments · Fixed by #5
Closed

Behavior in a subdirectory #4

ursm opened this issue Nov 2, 2024 · 3 comments · Fixed by #5

Comments

@ursm
Copy link
Contributor

ursm commented Nov 2, 2024

Hello.

I have a Rails application in a subdirectory of my repository (let's call it /app). In this case, I think glob should be app/spec/**/*_spec.rb, but RSpec expects Rails.root to be the working directory, which doesn't make sense. If you have a solution, I'd be happy to hear it.

@r7kamura
Copy link
Owner

r7kamura commented Nov 2, 2024

Hmmm, I have never been in that situation and I don't have a good solution at the moment. I guess the dirty way would be like to create a simlink from /spec to /app/spec before executing the action.

@r7kamura
Copy link
Owner

r7kamura commented Nov 2, 2024

I looked into the working-directory option, but it seems that this cannot be specified in uses unfortunately

@hoshinotsuyoshi
Copy link

I came across https://github.com/mtsmfm/split-test while checking out https://github.com/r7kamura/split-tests-by-timings. Since the subdirectory paths weren’t working well, I ended up using https://github.com/mtsmfm/split-test directly(and it worked great). I’m not involved with that internal project at my company anymore, but I’d love to give version v0.3.0+ a try sometime. Anyway, thanks a bunch for keeping it maintained! ❤️

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 a pull request may close this issue.

3 participants