-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
raise LoadError when a non-existent file or directory is specified to the test runner #21519
Conversation
… the test runner Currently, if a file or directory that does not exist was specified in the test runner, that argument is ignored. This commit has been modified to cause an error if there is no file or directory.
(@rails-bot has picked a reviewer for you, use r? to override) |
I remember wanting to change the same a couple weeks ago. I think after some back and forth with @kaspth we let it be for the moment. Maybe he remembers specifics 😁 |
I think it was running several rake tasks in one command: Perhaps checking if it’s a rake task before raising could do?
Kasper |
if self.test_patterns | ||
options[:patterns] = self.test_patterns | ||
else | ||
options[:patterns] = opts.order! |
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.
Should just be: options[:patterns] = test_patterns || opts.order!
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.
Disregard this and go with my other comment 😁
Awesome, thanks for working on this 👍 There's a few things I'd like you to address, but otherwise it should be smooth sailing 😁 |
test runner sets file to be tested in plugin_rails_options, but in plugin_rails_options, processing has been made to the argument of the actual command rather than the argument of Minitest.run. For example, if you run `./bin rake db:migrate test`, the options[:patterns], `db:migrate test` was incorrectly set.
4bbb667
to
df744b5
Compare
@kaspth Thanks for reviewing! I updated commit. |
raise LoadError when a non-existent file or directory is specified to the test runner
Thanks! |
1 similar comment
Thanks! |
Currently, if a file or directory that does not exist was specified in the test runner, that argument is ignored.
This commit has been modified to cause an error if there is no file or directory.
In addition, there is a problem that does not pass correctly the argument to test runner from the rake, thereby for now test will fail, was modified together.