What’s mining: sweeter Cucumber in RubyMine 3.2
We’ve spent some time in this iteration to add some nice and smart features to Cucumber tests editing. Here’s what you can expect in RubyMine 3.2. And you can already try this in recent pre-release builds.
Cucumber step usage search
Usages search is one of the core features of RubyMine and now it also works for Cucumber steps.
You can search for usages of a step from a scenario in a .feature file or from its definition in a _step.rb file.
‘Create Step Definition’ quickfix automatically creates arguments from <params>
If you create a step definition with parameters using the quick-fix
That’s what you got before RubyMine 3.2
And that’s what you get now.
Much better, right?
Examples tables formatting
Of course RubyMine can format table columns making them look good.
All you need to remember is the ‘Reformat code’ action hotkey: Ctr+Alt+L/⌘⌥L.
But we went further and now the table vertical line symbol is automatically inserted at the correct position as you type.
Duplicate step definitions inspection
The inspection verifies regular expressions inside step definitions across multiple files and reports a warning if equal definitions found.
We found it really useful for big test codebases such as ours.
Multireference cucumber step
Sometimes a step in a scenario can resolve to different step definitions, based on the parameters. Now RubyMine is smart enough to understand it and you can navigate to the exact step you need.
Calling Steps from Step Definitions
If you have a step definition that calls other steps RubyMine can navigate to those steps using ‘Go to Declaration’ (Ctr+B/⌘B)
This is it for now.
You’re welcome to try it and let us know what you think.
Subscribe to Blog updates
Thanks, we've got you!