You can execute your test scripts or features using run/debug configurations, in the way similar to running ordinary applications. RubyMine provides a framework for creating special run/debug configurations for testing purposes, where a test can be specified as a target.
In addition to the regular procedure described in the section Creating and Editing Run/Debug Configuration, RubyMine provides a shortcut that allows you to create run/debug configurations for all tests in a container, for a single test case, or even for a test method.
On this page:
- Right-click the desired target, for example a directory or an individual test in the Project tool window. In case of an individual test, you can open it in the editor, and right-click the background.
On the context menu of the selection, choosefor an individual test , or . For your convenience, the corresponding context menu commands are marked with icons:
- for Test::Unit.
- for RSpec.
- for Test-Spec.
- for Cucumber.
For a test method, open the class in the editor and right click anywhere in the method. The context menu suggests the command Create < method name>.
- In the dialog box that opens, specify the run/debug configuration parameters, apply changes and
close the dialog.
Ctrl+SpaceCtrl+SpaceCtrl+SpaceCtrl+SpaceAlt+SlashCtrl+SpaceCtrl+Space or Ctrl+Back SlashCtrl+SpaceCtrl+SpaceControl SpaceControl SpaceControl SpaceControl Space, Alt Escape or Shift Space code completion works in run/debug configuration dialog boxes, for example in the Working directory field.
Click thumbnail to view larger image.