atom-ruby-test icon indicating copy to clipboard operation
atom-ruby-test copied to clipboard

Launch current minitest case when its name contains spaces

Open brilnius opened this issue 4 years ago • 1 comments

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.

brilnius avatar Jan 07 '21 13:01 brilnius

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

moxley avatar Jan 07 '21 15:01 moxley