# File lib/guard/rspec.rb, line 49 def run_on_change(paths) paths += @failed_paths if @options[:keep_failed] paths = @inspector.clean(paths) passed = @runner.run(paths, options) if passed # clean failed paths memory @failed_paths -= paths if @options[:keep_failed] # run all the specs if the changed specs failed, like autotest run_all if @last_failed && @options[:all_after_pass] else # remember failed paths for the next change @failed_paths += paths if @options[:keep_failed] # track whether the changed specs failed for the next change @last_failed = true throw :task_has_failed end end