atom-rspec icon indicating copy to clipboard operation
atom-rspec copied to clipboard

Run spec from code file

Open dkniffin opened this issue 10 years ago • 2 comments

I'd like to be able to press the hotkey for "run test" from the code that I'm writing (not the spec file), and have it run the related test for that code.

Eg: if I'm working in dog.rb, I'd like to able to run dog_spec.rb (which could complete to spec/dog_spec.rb, or maybe ../../spec/models/dog_spec.rb).

dkniffin avatar Jul 21 '15 15:07 dkniffin

@dkniffin: Not exactly what you're looking for, but you could use ruby-test-switcher to help you doing that with two keystrokes.

Integrating its functionality with some test runners (like atom-rspec) is something I want to do. This way you could run the associated test file with a single keystroke instead of two ;)

dcarral avatar Sep 07 '15 07:09 dcarral

You can do this running your test once and then using the 'Run last' feature.

matugm avatar Mar 04 '16 18:03 matugm