Module: Guard::PHPUnit::Inspector

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

Overview

The Guard::PHPUnit inspector verfies that the changed paths are valid for Guard::PHPUnit.

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.tests_pathObject

Returns the value of attribute tests_path.



10
11
12
# File 'lib/guard/phpunit/inspector.rb', line 10

def tests_path
  @tests_path
end

Class Method Details

.clean(paths) ⇒ Array<String>

Clean the changed paths and return only valid PHPUnit tests files.

Parameters:

  • paths (Array<String>)

    the changed paths

Returns:

  • (Array<String>)

    the valid tests files



18
19
20
21
22
23
24
# File 'lib/guard/phpunit/inspector.rb', line 18

def clean(paths)
  paths.uniq!
  paths.compact!
  paths = paths.select { |p| test_file?(p) }
  clear_tests_files_list
  paths
end