2

It would be nice to have some more control over autotest besides Ctrl+C, which reruns all specs.

When using autotest within my Rails 3 project I often find myself waiting for some specs to finish, as autotest is always rerunning all specs in any file where one spec failed (e.g. user_spec.rb is executed completely and not only the one failing spec). Is there any keyboard shortcut to tell autotest to only run the specs that failed in all files? Or maybe some kind of interactive mode where you can tell autotest to execute only one specific file (sometimes many specs break when refactoring and I fix them file by file to stay sane).

If this doesn't exist, is there a good reason for it? I know that the whole spec suite should be run frequently and the above execution modes wouldn't do this, but IMHO this would really help in fixing individual specs quicker.

Diosney
  • 10,520
  • 15
  • 66
  • 111
Sascha Konietzke
  • 1,142
  • 9
  • 14
  • do you use Sublime Text? – David West May 23 '13 at 15:01
  • You can try to use guard gem https://github.com/guard/guard. If you are using rspec for testing, you can use https://github.com/guard/guard-rspec. If you modified file (for example users_controller.rb), after save it, users_controller_spec starts automatically. If you want to run all specs just press enter in guard console (see docs). – Alexander Kobelev Aug 18 '13 at 02:48

0 Answers0