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

Launch current minitest case when its name contains spaces #117

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

Conversation

brilnius
Copy link

@brilnius brilnius commented Jan 7, 2021

In a Minitest case, the action "Test Single" (ruby-test:test-single) does not work when the test-case name has spaces.
This is because:
test "my awesome feature" do
is equivalent to:
def test_my_awesome_feature

The triggered command is:
ruby -I test test/unit/contact_import_test.rb -n "/my awesome feature/"
But should be:
ruby -I test test/unit/contact_import_test.rb -n "/my_awesome_feature/"

This one-line patch simply replaces spaces with "_" on the fly, to make it work.
I'm not sure it will work for everybody, but hopefully some might find it useful.

@moxley
Copy link
Owner

moxley commented Jan 7, 2021

@brilnius: I sent you an invite to be a collaborator to this project.

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.

2 participants