summaryrefslogtreecommitdiff
path: root/test/rake
diff options
context:
space:
mode:
Diffstat (limited to 'test/rake')
-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 1532be1c9bf..f52040471bb 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 9b500dc0445..80fe9a28b4f 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