mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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
This commit is contained in:
parent
8591da82c9
commit
fb8f66cf23
2 changed files with 4 additions and 2 deletions
|
@ -17,8 +17,10 @@ class TestRakeApplication < Rake::TestCase
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_display_exception_details
|
def test_display_exception_details
|
||||||
|
obj = Object.new
|
||||||
|
obj.instance_eval("def #{__method__}; raise 'test'; end", "ruby")
|
||||||
begin
|
begin
|
||||||
raise 'test'
|
obj.__send__(__method__)
|
||||||
rescue => ex
|
rescue => ex
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -105,7 +105,7 @@ class TestRakeTestTask < Rake::TestCase
|
||||||
t.loader = :rake
|
t.loader = :rake
|
||||||
end
|
end
|
||||||
|
|
||||||
assert_match(/\A ".*?"\Z/, test_task.run_code)
|
assert_match(/\A(-I".*?" *)* ".*?"\Z/, test_task.run_code)
|
||||||
ensure
|
ensure
|
||||||
Gem.loaded_specs['rake'] = rake
|
Gem.loaded_specs['rake'] = rake
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue