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

Print '--seed=1234' rather than '--seed 1234' by default #765

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

cben
Copy link

@cben cben commented Jun 10, 2018

output before, when not specifying seed:

Run options: --seed 62153

after:

Run options: --seed=10759

Motivation

This is friendlier to re-running by copy-paste via Rake. These forms work:

env TESTOPTS='--seed=1234' rake test
rake test TESTOPTS='--seed=1234'

These forms with a space fail for me:

env TESTOPTS='--seed 1234' rake test
rake test TESTOPTS='--seed 1234'

with message like:

File does not exist: /home/me/kubeclient/1234

Of course this assumes one even discovers the rake TESTOPTS var...
Still, one less obstacle :-)

(I see from #564 you're not interested in minitest directly telling user Rake-specific hints how to use TESTOPTS.
Consider perhaps printing SEED=1234 hint instead of --seed hint? This works when running minitest directly, through Rake and probably through other runners.)

This is friendlier to passing options via Rake.  These forms work:
    env TESTOPTS='--seed=1234' rake test
    rake test TESTOPTS='--seed=1234'
These forms with a space fail:
    env TESTOPTS='--seed 1234' rake test
    rake test TESTOPTS='--seed 1234'
with message like:
    File does not exist: /home/me/myproject/1234
@zenspider
Copy link
Collaborator

I gotta say... I absolutely hate Rake's TestTask. I think it is just about the least usable thing out there. How about I replace it entirely with something that works well rather than applying bandaids to deal with rake?

https://github.com/seattlerb/hoe/blob/master/lib/minitest/test_task.rb

(this will be moved to minitest after running some laps)

@zenspider zenspider self-assigned this Jun 11, 2019
@cben
Copy link
Author

cben commented Dec 12, 2020

Friendly ping 👋
Any progress with replacing TestTask? IIUC the code you linked that would provide Minitest::TestTask, which will be opt-in, won't affect all the projects that followed current README's advice to use Rake::TestTask.
Any reason not to merge this tiny change?

dentarg added a commit to dentarg/puma that referenced this pull request Feb 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants