RubyMine 2019.3 Help

Supported testing frameworks/libraries

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, generate missing tests, and so on.

The following testing frameworks 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 following prerequisites are met:

    • The 'minitest' and 'minitest-reporters' gems are added to the Gemfile and installed to the project's SDK.

    • The following code is added to your tests:

      require 'minitest/reporters' MiniTest::Reporters.use!

      For example, in a Rails application, this code should be added to the test/test-helper.rb file.

  • 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.

Last modified: 27 December 2019