grab executable from rubygems

As done here d7fc97d3f9
This commit is contained in:
Arun Agrawal 2013-07-26 11:07:25 +02:00
parent 310fc2b8c1
commit f52832de2a
6 changed files with 6 additions and 12 deletions

View File

@ -14,9 +14,8 @@ Rake::TestTask.new { |t|
namespace :test do
task :isolated do
ruby = File.join(*RbConfig::CONFIG.values_at('bindir', 'RUBY_INSTALL_NAME'))
Dir.glob("test/**/*_test.rb").all? do |file|
sh(ruby, '-w', '-Ilib:test', file)
sh(Gem.ruby, '-w', '-Ilib:test', file)
end or raise "Failures"
end
end

View File

@ -20,9 +20,8 @@ end
namespace :test do
task :isolated do
ruby = File.join(*RbConfig::CONFIG.values_at('bindir', 'RUBY_INSTALL_NAME'))
test_files.all? do |file|
sh(ruby, '-w', '-Ilib:test', file)
sh(Gem.ruby, '-w', '-Ilib:test', file)
end or raise "Failures"
end
end

View File

@ -18,9 +18,8 @@ end
namespace :test do
task :isolated do
ruby = File.join(*RbConfig::CONFIG.values_at('bindir', 'RUBY_INSTALL_NAME'))
Dir.glob("test/{active_record,template}/**/*_test.rb").all? do |file|
sh(ruby, '-w', '-Ilib:test', file)
sh(Gem.ruby, '-w', '-Ilib:test', file)
end or raise "Failures"
end

View File

@ -13,9 +13,8 @@ end
namespace :test do
task :isolated do
ruby = File.join(*RbConfig::CONFIG.values_at('bindir', 'RUBY_INSTALL_NAME'))
Dir.glob("#{dir}/test/**/*_test.rb").all? do |file|
sh(ruby, '-w', "-I#{dir}/lib", "-I#{dir}/test", file)
sh(Gem.ruby, '-w', "-I#{dir}/lib", "-I#{dir}/test", file)
end or raise "Failures"
end
end

View File

@ -58,11 +58,10 @@ end
task "isolated_test_#{adapter}" do
adapter_short = adapter == 'db2' ? adapter : adapter[/^[a-z0-9]+/]
puts [adapter, adapter_short].inspect
ruby = File.join(*RbConfig::CONFIG.values_at('bindir', 'RUBY_INSTALL_NAME'))
(Dir["test/cases/**/*_test.rb"].reject {
|x| x =~ /\/adapters\//
} + Dir["test/cases/adapters/#{adapter_short}/**/*_test.rb"]).all? do |file|
sh(ruby, '-w' ,"-Itest", file)
sh(Gem.ruby, '-w' ,"-Itest", file)
end or raise "Failures"
end

View File

@ -12,9 +12,8 @@ end
namespace :test do
task :isolated do
ruby = File.join(*RbConfig::CONFIG.values_at('bindir', 'RUBY_INSTALL_NAME'))
Dir.glob("test/**/*_test.rb").all? do |file|
sh(ruby, '-w', '-Ilib:test', file)
sh(Gem.ruby, '-w', '-Ilib:test', file)
end or raise "Failures"
end
end