Module: Test::Unit::RequireFiles

Included in:
AutoRunner::Runner
Defined in:
lib/test/unit.rb

Instance Method Summary collapse

Instance Method Details

#non_options(files, options) ⇒ Object



212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
# File 'lib/test/unit.rb', line 212

def non_options(files, options)
  return false if !super
  result = false
  files.each {|f|
    d = File.dirname(path = File.expand_path(f))
    unless $:.include? d
      $: << d
    end
    begin
      require path unless options[:parallel]
      result = true
    rescue LoadError
      puts "#{f}: #{$!}"
    end
  }
  result
end