Aleksandar Simic | 28 Sep 2011 11:37
Picon

Re: rails / cucumber auto-completion


On Wed, Sep 28, 2011 at 12:27 AM, Lachlan Deck <lachlan.deck-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:

quite new to using emacs for rails dev... but was wondering what suggestions people had for getting cucumber auto-completion working?

i.e., project layout of:
app
<...>
features/*.feature
features/step_definitions/*.rb

Hello Lachlan,

I had something going, based on the existing examples for testunit/rspec as well as model/view/controller.

However, there's a problem,  for example a particular model will have a corresponding view/controller so you know what to jump to. But cucumber features won't always be named  in a obvious fashion which "links" them to a particular controller/view/model... so that you know what file *exactly* to jump to.

See the rinari-jump-schema variable and based on that you can create your own "jumps".

But I'm not sure how useful it would be over just using plain ido access to the feature and step files.

I've outlined here how you could do the jumps from feature files:

https://gist.github.com/1247477

See if it helps,
Aleksandar

Gmane