RubyMine 2023.2 Help

Test

RubyMine provides integration with the most popular frameworks used for testing Ruby/Rails applications. You can run multiple or individual tests, navigate between a test and test subject, create missing tests, and so on.

Supported testing frameworks and tools

The following testing frameworks and tools are supported:

  • Minitest

    Minitest is a testing framework that supports TDD and BDD approaches, mocking, and benchmarking. Before running Minitest tests in RubyMine, make sure that the 'minitest' gem is added to the Gemfile and installed to the project's SDK. RubyMine requires the Minitest gem v5.0 or later. You can use the older versions and launch tests from the console, but RubyMine’s GUI actions will be unavailable.

  • RSpec

    RSpec is a popular BDD framework for testing Ruby/Rails applications. Depending on your project type (Ruby or Rails), use the rspec or rspec-rails gem.

  • Cucumber

    Cucumber is a BDD testing tool that uses the Gherkin language for writing test scenarios. To learn more about Cucumber features supported in RubyMine, see Cucumber.

  • Test::Unit

    Test::Unit is a legacy TDD framework for testing Ruby/Rails code.

Apart from the frameworks listed above, RubyMine supports the following testing libraries:

  • Shoulda

    Apart from standard Minitest and RSpec tests, RubyMine allows you to run tests that use Shoulda.

  • FactoryBot

    FactoryBot is a library for setting up Ruby objects as test data that replaces fixtures. RubyMine allows you to safely rename or delete factories, complete factory attributes, and methods (for example, create and build), navigate from models to factories and vice-versa, and so on.

  • SimpleCov

    SimpleCov is an analysis tool used by RubyMine to measure code coverage. Learn how to do this from the Code coverage topic.

  • Capybara

    Capybara is a web-based test automation tool that simulates scenarios for user stories and automates web application testing for behavior-driven software development.

Last modified: 26 June 2023