SublimeRailsNav icon indicating copy to clipboard operation
SublimeRailsNav copied to clipboard

Navigate to test/spec

Open cmer opened this issue 12 years ago • 3 comments

It'd be nice if we could list test/spec files, and navigate directly to the corresponding test/spec based on which file is being edited.

cmer avatar Jun 27 '12 13:06 cmer

You're absolutely right - it should be in there. I'll see what I can do this week-end.

noklesta avatar Jun 27 '12 22:06 noklesta

Ok, I have implemented a new command called list_rails_tests (Simple Rails Navigator: List tests/specs in the command palette). You probably need to restart ST2 in order to make Package Control install the new version.

The test for a model or controller that is open in the active view is put at the top of the list, and it also works the other way round (from test to model or controller).

If the application contains a spec directory, the plugin will search for specs and ignore the test directory; otherwise the test directory will be used.

I am planning to include other test-related functionality as well (listing of fixtures, putting tests for views/helpers/routes at the top of the list whenever appropriate).

noklesta avatar Jul 04 '12 20:07 noklesta

thanks!

cmer avatar Jul 05 '12 20:07 cmer