aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-07-21 06:29:53 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-07-21 06:29:53 +0000
commitfb8f66cf2339fa4fd99bccc72adb39eab6ba2700 (patch)
treed9a062c40ae70c3ae1a687e07146cb0573700802
parent8591da82c9ace7f6166e8eb2ffb4d7a8bd520cd1 (diff)
downloadruby-fb8f66cf2339fa4fd99bccc72adb39eab6ba2700.tar.gz
test/rake: fix tests under test-all
* test/rake/test_rake_application.rb (test_display_exception_details): `RbConfig::CONFIG["prefix"]` can be the root directory, under test-all. * test/rake/test_rake_test_task.rb (test_run_code_rake_default_gem): `-I` may be inserted, under test-all. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46890 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--test/rake/test_rake_application.rb4
-rw-r--r--test/rake/test_rake_test_task.rb2
2 files changed, 4 insertions, 2 deletions
diff --git a/test/rake/test_rake_application.rb b/test/rake/test_rake_application.rb
index 1532be1c9b..f52040471b 100644
--- a/test/rake/test_rake_application.rb
+++ b/test/rake/test_rake_application.rb
@@ -17,8 +17,10 @@ class TestRakeApplication < Rake::TestCase
end
def test_display_exception_details
+ obj = Object.new
+ obj.instance_eval("def #{__method__}; raise 'test'; end", "ruby")
begin
- raise 'test'
+ obj.__send__(__method__)
rescue => ex
end
diff --git a/test/rake/test_rake_test_task.rb b/test/rake/test_rake_test_task.rb
index 9b500dc044..80fe9a28b4 100644
--- a/test/rake/test_rake_test_task.rb
+++ b/test/rake/test_rake_test_task.rb
@@ -105,7 +105,7 @@ class TestRakeTestTask < Rake::TestCase
t.loader = :rake
end
- assert_match(/\A ".*?"\Z/, test_task.run_code)
+ assert_match(/\A(-I".*?" *)* ".*?"\Z/, test_task.run_code)
ensure
Gem.loaded_specs['rake'] = rake
end