RubyMine 6.3.0 Web Help

RubyMine makes it possible to run all tests in a container, individual tests or test methods. For each one, RubyMine provides a temporary run-debug configuration that can be saved if necessary as a permanent one.

To run all tests in a directory
  1. In the project tool window, select the directory that contains tests to be executed.
  2. On the context menu, choose Run 'All in: <directory>'.

    ruby_runAllTests.png
    Click thumbnail to view larger image.

  3. If the directory contains tests that belong to the different testing frameworks, select configuration to be used:

    ruby_runAllTestsConfig.png
    Click thumbnail to view larger image.

  4. Explore results in the test runner.
To run a test case or test script
  1. Open the desired test in the editor, or select it in the Project tool window.
  2. On the context menu of the selection, choose Run <test class name>.
To run a test method or example
  1. Open the desired test in the editor.
  2. Place the caret somewhere within the test method body.
  3. On the context menu, choose Run <test method name>:

    ruby_runTestMethod.png
    Click thumbnail to view larger image.

Note

For the Rails applications, there is a dedicated test Rake task. This task runs Test::Unit tests with the specified arguments and Test::Unit runner UI. You can create a custom run/debug configuration for a Rake task on the base of the existing test task.

To run this task, press Ctrl+Alt+RCtrl+Alt+RCtrl+Alt+RCtrl+Alt+RCtrl+Alt+RCtrl+Alt+RCtrl+Alt+RCtrl+Alt+RAlt+RAlt RAlt RAlt RAlt R, and then press t. Refer to Running Rake Tasks for details.

See Also

Procedures:

Language and Framework-Specific Guidelines:

Web Resources: