In this section:
Introduction
If for some reason you have a Rails entity without a related test, note that IntelliJ IDEA suggests a way to generate
tests for the controllers, mailers, models, and helpers in the
RSpec
and Test::Unit
testing frameworks.
Generating tests
- In the editor, place the caret at the desired Rails entity.
- Do one of the following:
- On the main menu, choose .
- On the context menu, choose .
- Press Ctrl+Shift+T.
- If the desired test doesn't yet exist, the pop-up Generate Test appears. In this
window, choose the testing framework:
If the related testing framework is missing, IntelliJ IDEA will suggest to install the missing gem (for example,
rspec-rails):
- Click Bundle it to add the gem to the Gemfile, and in the
Bundle Install dialog run the bundler:


You can roll this action back in case something goes wrong.
|
|---|