Module: Guard::Cucumber::Inspector

Defined in:
lib/guard/cucumber/inspector.rb

Overview

The inspector verifies of the changed paths are valid for Guard::Cucumber.

Class Method Summary collapse

Class Method Details

.clean(paths) ⇒ Array<String>

Clean the changed paths and return only valid Cucumber features.

Parameters:

  • paths (Array<String>)

    the changed paths

Returns:

  • (Array<String>)

    the valid feature files



16
17
18
19
20
21
22
23
# File 'lib/guard/cucumber/inspector.rb', line 16

def clean(paths)
  paths.uniq!
  paths.compact!
  paths = paths.select { |p| cucumber_file?(p) || cucumber_folder?(p) }
  paths = paths.delete_if { |p| included_in_other_path?(p, paths) }
  clear_cucumber_files_list
  paths
end