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

Merge pull request #11608 from arunagw/ruby-from-rubygems

grab executable from rubygems
This commit is contained in:
Aaron Patterson 2013-07-28 13:55:46 -07:00
commit 586173204c
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