1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

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