Early Access Program News

RubyMine 2017.1 EAP 6: Test Generation for Rails, Parameter Hints, Markdown Plugin

Hi there,

RubyMine 2017.1 EAP 6 (build 171.3019.14) is out, featuring the long-awaited ability to create tests for Rails entities (controllers, models, helpers, mailers) from the Go to test action. This EAP also brings new parameter hints for Ruby, updated markdown plugin, and support for Cucumber 3.

Creating tests with Go to test

Imagine that for some reason you have a controller without a related test. In this case you can simply use the same Go to test (Navigate | Test) to generate the missing test:


If you don’t have the related testing framework installed, RubyMine will suggest to install the missing gem (currently works with RSpec and Test::Unit; more frameworks to be added):


Click “Bundle it” to add the gem to Gemfile, open the bundle install dialog and run the bundler. The IDE will install the missing gem and generate the test:


Note that you can roll this back in case something goes wrong.

Parameter hints

In this EAP you will stumble across the newly developed parameter hints, we’ve added to increase the readability of Ruby code. Note that this feature is still under development and will be updated in future EAPs. Feel free to toggle these hints and let us know if you find room for improvement:


Updated structure view for markdown files

Thanks to @holgerbrandl, the structure view of markdown files was updated and now represents the table of contents of your .md files. What is more, now you can search through the subheadings:


As for other improvements, we’ve added support for Cucumber 3 and fixed a number of bugs.

Download this Early Access Program from our What’s new page.

See our release notes for the full list of improvements, and share your thoughts in the comments below.

Your RubyMine Team

Comments below can no longer be edited.

13 Responses to RubyMine 2017.1 EAP 6: Test Generation for Rails, Parameter Hints, Markdown Plugin

  1. Avatar

    Uwe Kubosch says:

    February 10, 2017

    The new feature to generate a test from a controller does not work with Minitest which is the default test framework for Rails. It insists on test_unit.

  2. Avatar

    Roman Melnyk says:

    February 10, 2017

    also this new feature to generate a test does not work from the custom (like `services`) directory

    • Avatar

      Artem Sarkisov says:

      February 10, 2017

      Roman, how do you usually generate tests for files located in custom directories?

      • Avatar

        Roman Melnyk says:

        February 10, 2017

        manually, the spec directories list is a mirror of the directories from `/app`, so then `/app/services/some_service.rb` has corresponding `/spec/services/some_service_spec.rb`

        • Avatar

          Dmitry Krasilschikov says:

          February 15, 2017

          Hi, Roman,

          are your Rails entities (controller, model etc.) defined as Rails entities in RubyMine? Do you see them in Rails View and have the rest of Rails support for them? If so on the ‘Go to tests’ action you should see popup with suggestion to install rspec/test_unit.

          Or you do see the popup but test generation fails for some reason?

          • Avatar

            Roman Melnyk says:

            February 15, 2017

            Hi Dmitry,

            for all non-standart rails entities within `/app` directory (like `/app/decorators`, `/app/services` etc http://i.imgur.com/H7Godgv.png) I do not see the popup, just the message http://i.imgur.com/g7Wlj7D.png). For all the standard rails entities (`/app/models`, `/app/controllers`) it does work

          • Avatar

            Justin Maxwell says:

            February 27, 2017

            I’m finding this frustrating as well. A bit of a Rails newbie, but it seems ‘odd’ to not be able to create an RSpec test ‘in context’ for some sorts of objects (like services) but only be able to do so for the ‘major’ object types.

            Also, side-note: The icons in the context menu from a folder in the project view don’t show the specific test-type icons (i.e. the icons shown here https://www.jetbrains.com/help/ruby/2016.3/creating-run-debug-configuration-for-tests.html are not used universally)

  3. Avatar

    Jan says:

    February 10, 2017

    It would be nice if the template was customizable (unless it is). `Rspec.` and `typ: :controller` can be skipped in a typical setup

    • Avatar

      Dmitry Krasilschikov says:

      February 15, 2017

      Hello, Jan,

      do you want test generation to be customizable, e.g. with settings dialog, like it’s implemented for the implicit generation action? Please clarify.

      • Avatar

        Jan Jędrychowski says:

        February 15, 2017

        I think it should be customized only once in Preferences.
        For me generated tests are similar to Live Templates feature.
        Thanks for the response.

  4. Avatar

    KING SABRI says:

    March 25, 2017

    OMG, the parameter hints option is AWESOME!!

    The only thing I miss in Rubymine is when I open an individual ruby file, the tree sidebar doesn’t show the other files in the same file directory. (like some text editors)

    Thank you, guys!

Discover more