Guard::Rspec doesn't come with some special spring handling and the latest version 4.0 even removes the spring
option in favor of the more common and thus flexible cmd
option. But since a Guardfile
is normal Ruby code, you can use at_exit
to stop spring if you like:
at_exit { `spring stop` }
guard 'rspec', cmd: 'spring rspec' do
watch(%r{^(.*)\.(rb|haml|erb|coffee)$}) { 'spec' }
end