rcarriga / vim-ultest

The ultimate testing plugin for (Neo)Vim
MIT License
385 stars 15 forks source link

Nothing happens on any Ult* command #21

Closed jchilders closed 3 years ago

jchilders commented 3 years ago

Describe the bug When attempting to run any of the Ult* commands, nothing happens.

Output of vim-ultest.log after running UltestNearest and then UltestAttach:

12:22:23 | INFO | MainThread | logging.py:create_logger:71 | Logger created
12:22:23 | DEBUG | MainThread | __init__.py:__init__:40 | Handler created
12:22:30 | INFO | MainThread | __init__.py:run_nearest:115 | Running nearest test in spec/models/fast_forward_spec.rb at line 139

Running tests with TestNearest from vim-test work as expected.

To Reproduce Call :UltestNearest, etc.

Expected behavior Tests are executed.

Screenshots If applicable, add screenshots to help explain your problem.

Additional context This is a Ruby on Rails project. Not sure if that matters.

rcarriga commented 3 years ago

Ah yes I see the issue, vim-ultest looks for test in a file path, which obviously isn't here. I'm not familiar with ruby, is spec standard in a test file?

jchilders commented 3 years ago

@rcarriga For projects that use rspec -- which is every Rails project I have worked on -- yes, that directory is standard. By default, though, Rails uses the test directory. The following patterns should cover almost every case, though:

spec/**/*_spec.rb
test/**/*_test.rb

To reiterate, though: whatever TestNearest does handles this case. Perhaps UltTest* can delegate to that?

rcarriga commented 3 years ago

Yep have changed it to now use vim-test to determine if the file is a test file. Unfortunately it does cause the loading of potentially quite a few scripts on startup but at least it will be consistent with vim-test

github-actions[bot] commented 3 years ago

:tada: This issue has been resolved in version 2.5.5 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket: