[ruby/rdoc] Follow-up rubygems
Use test-unit assertions instead of minitest. https://github.com/ruby/rdoc/commit/d6a6209d7f
This commit is contained in:
parent
10e63f3f56
commit
f18a0b7654
@ -3,6 +3,12 @@ require 'rubygems/test_case'
|
|||||||
require 'rdoc/rubygems_hook'
|
require 'rdoc/rubygems_hook'
|
||||||
|
|
||||||
class TestRDocRubygemsHook < Gem::TestCase
|
class TestRDocRubygemsHook < Gem::TestCase
|
||||||
|
unless method_defined?(:assert_path_exist)
|
||||||
|
alias assert_path_exist assert_path_exists
|
||||||
|
end
|
||||||
|
unless method_defined?(:assert_path_not_exist)
|
||||||
|
alias assert_path_not_exist refute_path_exists
|
||||||
|
end
|
||||||
|
|
||||||
def setup
|
def setup
|
||||||
super
|
super
|
||||||
@ -165,8 +171,8 @@ class TestRDocRubygemsHook < Gem::TestCase
|
|||||||
|
|
||||||
@hook.generate
|
@hook.generate
|
||||||
|
|
||||||
refute_path_exists File.join(@a.doc_dir('rdoc'), 'index.html')
|
assert_path_not_exist File.join(@a.doc_dir('rdoc'), 'index.html')
|
||||||
assert_path_exists File.join(@a.doc_dir('ri'), 'cache.ri')
|
assert_path_exist File.join(@a.doc_dir('ri'), 'cache.ri')
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_generate_no_overwrite
|
def test_generate_no_overwrite
|
||||||
@ -176,8 +182,8 @@ class TestRDocRubygemsHook < Gem::TestCase
|
|||||||
|
|
||||||
@hook.generate
|
@hook.generate
|
||||||
|
|
||||||
refute_path_exists File.join(@a.doc_dir('rdoc'), 'index.html')
|
assert_path_not_exist File.join(@a.doc_dir('rdoc'), 'index.html')
|
||||||
refute_path_exists File.join(@a.doc_dir('ri'), 'cache.ri')
|
assert_path_not_exist File.join(@a.doc_dir('ri'), 'cache.ri')
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_new_rdoc
|
def test_new_rdoc
|
||||||
@ -201,7 +207,7 @@ class TestRDocRubygemsHook < Gem::TestCase
|
|||||||
refute @hook.rdoc_installed?
|
refute @hook.rdoc_installed?
|
||||||
refute @hook.ri_installed?
|
refute @hook.ri_installed?
|
||||||
|
|
||||||
assert_path_exists @a.doc_dir
|
assert_path_exist @a.doc_dir
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_remove_unwritable
|
def test_remove_unwritable
|
||||||
@ -231,7 +237,7 @@ class TestRDocRubygemsHook < Gem::TestCase
|
|||||||
def test_setup
|
def test_setup
|
||||||
@hook.setup
|
@hook.setup
|
||||||
|
|
||||||
assert_path_exists @a.doc_dir
|
assert_path_exist @a.doc_dir
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_setup_unwritable
|
def test_setup_unwritable
|
||||||
|
Loading…
x
Reference in New Issue
Block a user