moxley / atom-ruby-test

Run Ruby tests, Rspec examples, and Cucumber features from Atom
MIT License
43 stars 36 forks source link

Run tests for current code file #93

Open Drenmi opened 7 years ago

Drenmi commented 7 years ago

I would like to be able to run the tests for a certain file from within that file, without having to switch over to the spec file.

I figure since test directories will commonly mirror the code directory in Ruby projects, we should be able to make an educated guess about where the test file might be. 😀

moxley commented 7 years ago

Cool. What should it do if the current file is neither the test file nor the file under test?

rposborne commented 7 years ago

@moxley prompt to create the new test file. With a guess of the folder and filename

if rspec detected so app/models/contact.rb would suggest spec/models/contact_spec.rb