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:

automatic_test_generation_rubymine

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):

missing_gem_bundle

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:

test_generation_rubymine

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:

ruby_code_parameter_hints

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:

markdown_plugin_rubymine

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

This entry was posted in Announcement, WhatsMining and tagged , . Bookmark the permalink.

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

  1. Uwe Kubosch says:

    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. Roman Melnyk says:

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

    • Artem Sarkisov says:

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

      • Roman Melnyk says:

        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

        • Dmitry Krasilschikov says:

          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?

  3. Jan says:

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

  4. Pingback: RubyMine Blog

  5. Pingback: RubyMine 2017.1 Released: Docker, RuboCop, Puppet, Test Generation for Rails, and More! | RubyMine Blog

  6. KING SABRI says:

    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!

  7. Pingback: RubyMine 2017.1リリース: Docker, RuboCop, Puppet, RoRのテスト生成など! | JetBrains ブログ

Leave a Reply

Your email address will not be published. Required fields are marked *