arthurnn / minitest-emacs

A minitest mode for emacs
49 stars 26 forks source link

Test file name regex #36

Open ghost opened 7 years ago

ghost commented 7 years ago

Hi! I just started using yasnippet and noticed that minitest-mode isn't identifying my test files (test_*.rb). At first it seemed odd since it does run my tests. Then I looked at the code and noticed it can also run minitest specs, awesome! I came up with a regex for minitest-test-file-name-re that covers test_*.rb, _spec.rb, [-_]test.rb so yasnippet is on by default regardless of test file naming style. Would it be ok to change it or is there a reason behind only covering [-_]test.rb files? Cheers!

arthurnn commented 7 years ago

Would it be ok to change it or is there a reason behind only covering [-_]test.rb files?

should be ok. wanna send a PR?

ghost commented 7 years ago

I tried writing a test checking that a buffer enters minitest-mode only with file names matching the regex but couldn't figure out how to do it. Any suggestions?