Skip to content

Commit 626b12b

Browse files
committed
re-arrange load-path with rake test & integration:test
1 parent b33f80f commit 626b12b

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

Rakefile

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,9 @@ file('lib/jopenssl.jar') { Rake::Task['jar'].invoke }
3737

3838
require 'rake/testtask'
3939
Rake::TestTask.new do |task|
40-
task.libs << 'lib'
41-
task.test_files = FileList['src/test/ruby/**/test*.rb']
40+
task.libs << 'src/test/ruby'
41+
test_files = FileList['src/test/ruby/**/test*.rb'].to_a
42+
task.test_files = test_files.map { |path| path.sub('src/test/ruby/', '') }
4243
task.verbose = true
4344
task.loader = :direct
4445
end
@@ -58,7 +59,8 @@ namespace :integration do
5859
end
5960
loader = "ARGV.each { |f| require f }"
6061
test_files = FileList['src/test/integration/*_test.rb'].to_a
61-
lib = [ 'lib' ]; lib << '.' if RUBY_VERSION > '2.2'
62+
test_files.map! { |path| path.sub('src/test/integration/', '') }
63+
lib = [ 'lib', 'src/test/integration' ]
6264
ruby "-I#{lib.join(':')} -e \"#{loader}\" #{test_files.map { |f| "\"#{f}\"" }.join(' ')}"
6365
end
6466
end

0 commit comments

Comments
 (0)