def run_on_changes(paths)
      paths += @failed_paths if @options[:keep_failed]
      paths = @inspector.clean(paths).uniq

      if passed = @runner.run(paths)
        remove_failed(paths)

        # run all the specs if the run before this one failed
        if @last_failed && @options[:all_after_pass]
          @last_failed = false
          run_all
        end
      else
        @last_failed = true
        add_failed(paths)

        throw :task_has_failed
      end
    end
def run_on_changes(paths)
      paths += @failed_paths if @options[:keep_failed]
      paths = @inspector.clean(paths).uniq

      if passed = @runner.run(paths)
        remove_failed(paths)

        # run all the specs if the run before this one failed
        if @last_failed && @options[:all_after_pass]
          @last_failed = false
          run_all
        end
      else
        @last_failed = true
        add_failed(paths)

        throw :task_has_failed
      end
    end
Called on file(s) modifications that the Guard watches.
 @param [Array<String>] paths the changes files or paths
 @raise [:task_has_failed] when run_on_change has failed