I use this:
Dir.entries( File.dirname( __FILE__ ) ). grep( /test.*\.rb/ ) { | file | require_relative file }
Unfortunately, Ruby does not allow strings before the dot, so the perfect form does not work:
Dir.entries( File.dirname( __FILE__ ) ) .grep( /test.*\.rb/ ) { | file | require_relative file }
source share