Sha256: b1aa8ee56ebf08f39c6d4124f3d9c874d1c006ab38465a96793ae42c8e396854
Contents?: true
Size: 920 Bytes
Versions: 18
Compression:
Stored size: 920 Bytes
Contents
require 'guard/rspec/inspectors/base_inspector.rb' module Guard class RSpec module Inspectors # Inspector that focuses on set of paths if any of them is failing. # Returns only that set of paths on all future calls to #paths # until they all pass class FocusedInspector < BaseInspector attr_accessor :focused_locations def initialize(options = {}) super @focused_locations = [] end def paths(paths) if focused_locations.any? focused_locations else _clean(paths) end end def failed(locations) if locations.empty? @focused_locations = [] else @focused_locations = locations if focused_locations.empty? end end def reload @focused_locations = [] end end end end end
Version data entries
18 entries across 16 versions & 2 rubygems