From the README…
Significant Other: An Atom Package
Provides a command to quickly switch between a source code file and its corresponding test file, and vice versa. Works with most project structures.
Supported project structures
Significant Other is intended to work automatically with popular project structures. It works with the project structure used in Rails projects, in Atom packages, in Ruby gems, and it will hopefully work for your project as well. To provide its functionality, Significant Other makes a few assumptions (listed below) about your project’s conventions.
Significant Other assumes that:
- You want to toggle between a source file and the corresponding test file, or vice versa.
- The source file and the test file start with the same name. The test file may include a suffix of
-spec. For example, you can toggle between:
- The source file and the test file have the same file extension. (I may consider removing this assumption at some point.)
If your project follows a well-defined, widely-used project structure that doesn’t satisfy the assumptions above, please let me know about it so that I can consider enhancing the package to support that project structure.
apm install significant-other
Or search for
significant-other in the Atom Settings UI.
Bring your own keymap
You may want to use a keyboard shortcut for switching between source files and test files. This package does not provide a keyboard shortcut by default, but you can easily define your own. For example, if you wanted to use
Control-., you’d add the following mapping to your
'atom-workspace atom-text-editor:not(.mini)': 'ctrl-.': 'significant-other:toggle'
- Cache the last n matches for faster toggling
- Support projects that have multiple root directories [code]
- Consider providing option to open the current file’s significant other in a split pane
- Consider exposing the list of test/spec suffixes as a configuration option
- Consider excluding some directories from the search for better performance
- Set up CI