RubyMine not recognizing Cucumber steps in shared project

We are starting to use Cucumber heavily in several projects, and I have extracted some steps that are common to several projects to a shared git repository. When I am creating features and scenarios, RubyMine very helpfully shows me that the steps defined in the project I am working on are correct, and offers auto complete. But for the steps that are in my shared repository, I get no help. Here is a screenshot:

Screenshot from 2014-07-03 09:14:29.png
I actually have defined the step that is shown with the yellow background, but I don't know how to tell RubyMine "Also look over here for step definitions"

I've looked at the RubyMine help, but I have been unsuccessful in finding anything.

I'm running RubyMine 6.3.2, build 135-809 on Ubuntu 12.04



Attachment(s):
Screenshot from 2014-07-03 09:14:29.png
9 comments

I can't see the screen shot. Could you attach it once again?

0

I attached a file - for some reason the png isn't showing up. Maybe a JPG?

Screenshot from 2014-07-03 09:14:29.jpg
Strange. When I edit the post, the image shows up, but when viewing the post the image isn't there. Maybe a dropbox public link will work:

https://dl.dropboxusercontent.com/u/25408833/Screenshot%20from%202014-07-03%2009%3A14%3A29.jpg

I also looked at a couple of the other posts here that seem related - currently, my shared steps are not in a gem, but just in a peer project. Here is what my project structure looks like:

https://dl.dropboxusercontent.com/u/25408833/Screenshot%20from%202014-07-03%2009%3A54%3A19.png

0

Same problem.

Im my case, rubymine cannot found step definitions inside a gem.

0

Its just a private/personal gem that Ive made. It contains step definitions. Its not one of the "big gems".



Basically, I have step definitions inside the gem, in a path that is like features/step_definitions/web_page_steps.rb.

If I launch the tests using Terminal (I am using Watir and Cucumber in MacOs, and the MacOs version of Rubymine 6), the tests are executed correctly (it is able to find the steps, and the methods that call the steps). And everything works.



But, nevertheless, RubyMine is still giving me an alert of "Missing Step definition" for every step that is contained inside my gem.

0

The gem I am actually talking about is "bimblis" gem.

Anyway, how is that "it was given usability to factory-girl and other major gems"? What are the steps to give this kind of usability to a gem?

0

At the moment RubyMine scans for step_definition only inside 7 hardcoded gems (FactoryGirls, Aruba, Calabash and several others). We are thinking about a way to provide possibility to specify custom gems to scan for step definitions.   

0

Sorry to drag up an old thread but I've just encountered this using RubyMine 2016.2.3. I'm in the same situation as others whereby I'm writing a gem containing cucumber steps, for our team to re-use across multiple projects. The tests do run correctly however RubyMine doesn't recognise the steps that are located within the library gem.

RubyMine folks - would it be possible to implement this feature? I'm guessing there was a reason for hardcoding the 7 gems listed above. If the reason was performance related (in terms of scanning lots of files) would it be possible to define some sort of a layout convention that gem maintainers must adhere to in order to have their steps scanned for?

It would be great if it were possible to implement this feature.

Cheers,

Edd

0

Hello, Edd,

could you please vote for the corresponding request on our tracker (in this case you'll also receive notifications regarding any change of its state):

https://youtrack.jetbrains.com/issue/RUBY-16386 

0

Please sign in to leave a comment.