Is there a way to force all specifications to run with guard + guard-rspec?

Is there something similar to autotest ctrl + c to make all specifications run? I'm still working on customizing my .Guard file, but so far, can I run all the specifications without restarting the protection? ctrl + c ends the guard.

+4
source share
3 answers

The posix signals Mark offers are no longer used to interact with protection. See the Interactions section of README for a new way to interact.

To run each security method run_all , simply press enter in the security terminal. To call the rspec run_all method, type rspec and press enter.

+26
source

https://github.com/guard/guard#interactions

You can interact with the Guard and enter commands when the Guard has nothing to do. Guard understands the following commands:

 ↩: Run all Guards. h, help: Show a help of the available interactor commands. r, reload: Reload all Guards. n, notification: Toggle system notifications on and off. p, pause: Toggles the file modification listener. The prompt will change to p> when paused. This is useful when switching Git branches, rebase Git or change whitespace. e, exit: Stop all Guards and quit Guard. 

So, basically you go to the terminal where Guard works, and press enter / return.

+15
source

Probably the easiest way is to use Spork and then simplify your Guardfile:

 # Guardfile guard 'rspec', :version => 2, :cli => '--drb' do # :cli => is important! watch(%r{^spec/}) { "spec" } watch(%r{^app/}) { "spec" } watch('config/routes.rb') { "spec" } end 

This will cause something to appear in the spec folder when something in the spec , app or routes.rb changes as soon as you save it and saves you a ton of time.

Use the labels growl (mac) or libnotify (linux) for pop-up notifications. Then you simply enter the code into your editor, and soon after each save you will receive a pop-up error / failure message. If this is a pass, you just continue coding - if it is not a failure, you go to the terminal and check what the error is.

+4
source

All Articles