Prerequisites
Note
Prior to launching Spork DRb server, make sure spork
gem,
and the corresponding testing gems (rspec-rails, cucumber, cucumber-rails, etc.)
are used in your application.
Refer to the sections under Ruby Gems Support for details about installing gems and using them in project.
- On the main menu, choose .
- In the Spork DRb Launch Options dialog box, select the desired testing framework, and click Run.
If you are going to use spork for the first time in your project, launch the action with the Perform bootstrap check box selected. Thus Spork will patch the testing scripts.
The DRb server starts in a separate tab of the Run tool window.
- Make sure that DRb server is launched using RubyMine and is running in the background.
- Run a test script, or one of its examples. Note that the option Use DRb server is automatically selected in the corresponding run configuration. If you want to run this test locally, you have to clear this check box.
- Click
to stop the DRb server without closing its tab in the Run tool window. - Click
to close the DRb server tab. - Click
to rerun DRb server in the same tab.
- Make sure the breakpoints are set in the test script you want to debug.
- On the main toolbar, click the run/debug configuration selector, and click .
- In the Run/Debug Configurations dialog box, create Spork DRb run/debug configuration. Refer to the section Creating and Editing Run/Debug Configurations for the detailed description of the procedure.
- Launch Spork DRb in the debug mode. To do that, with the Spork DRb run/debug configuration selected, click
,
or press Shift+F9Shift+F9Shift+F9Shift+F9Shift+F9Alt+F5Ctrl+F5Alt+Shift+D or Shift+F9Shift+F9Shift F9Shift F9Meta F11Shift F9.
- With the Spork DRb server running in the debug mode, run the desired test script.
Tips
Tip
- RubyMine creates a temporary run/debug configuration for Spork DRb server. Later you can change this run/debug configuration as required, save it as permanent, and use it to launch the server.
- If you are using TeamCity
, avoid overhead by adding the following statement into
Spork.preload :
require 'teamcity/spec/runner/formatter/teamcity/formatter'
