How to get Spring to work with single file/line tests in Minitest
You can run single test using Rails 5 test runner by specifying the file and the line number like the following:
rails test path/to/test:55
Executing tests by using Rails 5 test runner has an advantage because it uses Spring preloader.
However, in RubyMine, you can run single test from context menu on a test you want to run. However, since it is not via the above test runner, it does not use Spring preloader and takes long to launch a test.
RubyMine documents say that Spring is used as a preloader by default, but as far as I see it is used only when you run whole tests instead of a single file and a single method.
I have tried to create new Run/Debug configuration to run test via spring, but I am still not sure how to get it work.
Please let me know how to run single file/line test via Rail5 test runner or the way to get spring work along with single file/line test.
Please sign in to leave a comment.
Hello,
we have a corresponding issue on our tracker:
https://youtrack.jetbrains.com/issue/RUBY-19960
You can vote for it so that you receive notifications regarding its state.