Method: Buffet.extract_specs_from
- Defined in:
- lib/buffet.rb
.extract_specs_from(files) ⇒ Object
Given a set of files/directories, return all spec files contained
47 48 49 50 51 52 53 54 55 56 57 |
# File 'lib/buffet.rb', line 47 def self.extract_specs_from files specs = [] files.each do |spec_file| Find.find(spec_file). reject { |file| Settings.file_excluded?(file) }. each do |file| specs << file if file.match /_spec\.rb$/ end end specs.uniq end |