Ruby Development Tools Documentation - 0.6.0

Running a Test::Unit Test

Starting from Ruby Resource View

The context menu of a ruby file in the Ruby Resource View has a Test::Unit entry from which the file can be started in run mode.

Figure 3.11. Run Test::Unit Test from context menu

Run Test::Unit Test from context menu

Starting from main menu

The Run main menu also offers a menu point for starting a Test::Unit Test. Which file is started is determined by the active file (marked with the blue border). This can be the file selected in the editor or the Ruby Resource View. If the Ruby Resource View is active, the file selected in the resource tree is started. If the editor is the active part, the file in the active editor is started.

Figure 3.12. Run Test::Unit Test from main menu

Run Test::Unit Test from main menu

Test::Unit Test Run Configuration

Every time a test is started from one of the described menu items, a Test::Unit run configuration is created. If the test is started a second time, this run configuration is used again. That allows to add parameters for the start, change the working directory or the interpreter to start with.

The following library paths are always added when the application is started (using the -I option of the ruby interpreter) and are not listed in the configuration dialog:

  • The directory in which the started file resides

  • The path of the project in which the started file resides

  • The path of all dependent projects of the started file's project

Figure 3.13. Run Test::Unit Test from configuration

Run Test::Unit Test from configuration