moxley / atom-ruby-test

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

Question: Can this work with Spring preloader #40

Closed jesperronn closed 9 years ago

jesperronn commented 9 years ago

Hey I love the this Atom package for the simplicity and ease-of-use.

I am always looking for ways to speed up my development process.

I started using the Spring preloader for a recent Rails project I am working on. This makes the test run without any startup time from the commandline like this:

spring rake

Within this plugin I can see it runs (for single test) a command looking like this example: ruby -I test test/controllers/comments_controller_test.rb

Is it possible to also use the spring preloader from inside atom-ruby-test? If so, how should I modify the commands?

jesperronn commented 9 years ago

I think I got it working in some way. This command works for me, and assumes Rails 4:

all tests: spring rake test

single file: spring rake test {relative_path}

In case anyone else needs the info, I ended up with these lines in my ~/.atom/config.cson:

  "ruby-test":
    testFileCommand: " spring rake test {relative_path}"
    testAllCommand: "spring rake test"
chrisnicola commented 9 years ago

I don't believe you can run rake test {relative_path} to run tests on a single file. The syntax is:

rake test TEST={relative_path}