moxley / atom-ruby-test

Run Ruby tests, Rspec examples, and Cucumber features from Atom
MIT License
43 stars 36 forks source link

Launch current minitest case when its name contains spaces #117

Open brilnius opened 3 years ago

brilnius commented 3 years ago

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 commented 3 years ago

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