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



236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
# File 'lib/test/unit.rb', line 236

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