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

raise LoadError when a non-existent file or directory is specified to the test runner #21519

Merged
merged 2 commits into from
Sep 8, 2015

Conversation

y-yagi
Copy link
Member

@y-yagi y-yagi commented Sep 6, 2015

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.

… 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
Copy link

r? @rafaelfranca

(@rails-bot has picked a reviewer for you, use r? to override)

@senny
Copy link
Member

senny commented Sep 7, 2015

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 😁

@kaspth
Copy link
Contributor

kaspth commented Sep 7, 2015

I think it was running several rake tasks in one command: bin/rake db:migrate test. Because we can’t tell if the thing missing is a rake task, why can’t really fix this.

Perhaps checking if it’s a rake task before raising could do?

Den 07/09/2015 kl. 09.07 skrev Yves Senn notifications@github.com:

I remember wanting to change the same a couple weeks ago. I think after some back and forth with @kaspth https://github.com/kaspth we let it be for the moment. Maybe he remembers specifics


Reply to this email directly or view it on GitHub #21519 (comment).

Kasper

if self.test_patterns
options[:patterns] = self.test_patterns
else
options[:patterns] = opts.order!
Copy link
Contributor

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!

Copy link
Contributor

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 😁

@kaspth
Copy link
Contributor

kaspth commented Sep 7, 2015

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.
@y-yagi
Copy link
Member Author

y-yagi commented Sep 7, 2015

@kaspth Thanks for reviewing! I updated commit.

kaspth added a commit that referenced this pull request Sep 8, 2015
raise LoadError when a non-existent file or directory is specified to the test runner
@kaspth kaspth merged commit e75b92c into rails:master Sep 8, 2015
@kaspth
Copy link
Contributor

kaspth commented Sep 8, 2015

Thanks!

1 similar comment
@y-yagi
Copy link
Member Author

y-yagi commented Sep 8, 2015

Thanks!

@y-yagi y-yagi deleted the test_runner_raise_error branch September 8, 2015 08:17
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.

None yet

5 participants