👋, I've recently found out one can create new tests for the currently open file with the command `Navigate | Test`: https://www.jetbrains.com/help/ruby/create-tests.html#navigate
It seems like this only works for Rails projects, as the documentation suggests it runs `rails generate` to create the test file.
The main projects I use RubyMine for are not Rails, but I would love to get this automatic test generation working.
I use RSpec for testing and RubyMine navigates without issue between existing tests and their respective production code with `Navigate | Test`. The `New | Ruby Test` generator is also correctly configured for my project, but using is not as convenient as `Navigate | Test`, given most of the friction comes from navigating to the correct `spec/` directory to create the matching test file.
Given my options, my current workflow is: find a neighbor production file to the file I want to test, execute `Navigate | Test` in that file, create a new test file for the file I wanted to test in the same test directory. This new test file doesn't come with matching information about the file I wanted to test, so I have to set that up myself (e.g. copying the class name and its module path).
Is there a contract my RubyMine Ruby project has to fulfill in order for `Navigate | Test` to suggest me the creation of a test file when one is not present?
I have the liberty to modify my project as I wish (adding arbitrary files, like `bin/rails`, or adding new Rake tasks) if needed.