tl;dr
To adjust code templates in RubyMine, navigate to Settings -> Editor -> File and Code Templates.
Example
You can navigate to the test file of the currently open file with the shortcut Ctrl + T
. If no test file exists, you can generate a new test file. If you are not pleased with the output, you can adjust the related code template. To do this, open the project settings and navigate to Editor -> File and Code Templates -> Files. Now, choose your relevant file type and adjust the code template according to your preferences.
For example, the RSpec code template generates way too much boilerplate. Something like this is far more suitable for our projects than the default:
describe ${NAME} do
end
Posted by Julian to makandra dev (2024-08-28 14:01)