From 23aa42d957294b025a367c543cd99f137c48e289 Mon Sep 17 00:00:00 2001 From: elijah Date: Wed, 19 Jun 2013 17:51:24 -0700 Subject: fixed utf8 bug when locale not set, and improved testing for ruby 1.8. --- test/test_helper.rb | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'test/test_helper.rb') diff --git a/test/test_helper.rb b/test/test_helper.rb index c813ead..45deec9 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -31,7 +31,7 @@ class MiniTest::Unit::TestCase end def leap_bin(*args) - `#{ruby_path} #{base_path}/bin/leap #{args.join ' '}` + `cd #{test_provider_path} && #{ruby_path} #{base_path}/bin/leap #{args.join ' '}` end #def test_platform_path @@ -43,9 +43,14 @@ class MiniTest::Unit::TestCase end def with_multiple_rubies(&block) - ['ruby1.8', 'ruby1.9.1'].each do |ruby| - self.ruby_path = `which #{ruby}`.strip - next unless ruby_path.chars.any? + if ENV["RUBY"] + ENV["RUBY"].split(',').each do |ruby| + self.ruby_path = `which #{ruby}`.strip + next unless ruby_path.chars.any? + yield + end + else + self.ruby_path = `which ruby`.strip yield end self.ruby_path = "" -- cgit v1.2.3