33require 'rdoc/rubygems_hook'
44
55class TestRDocRubygemsHook < Gem ::TestCase
6+ unless method_defined? ( :assert_path_exist )
7+ alias assert_path_exist assert_path_exists
8+ end
9+ unless method_defined? ( :assert_path_not_exist )
10+ alias assert_path_not_exist refute_path_exists
11+ end
612
713 def setup
814 super
@@ -165,8 +171,8 @@ def test_generate_force
165171
166172 @hook . generate
167173
168- refute_path_exists File . join ( @a . doc_dir ( 'rdoc' ) , 'index.html' )
169- assert_path_exists File . join ( @a . doc_dir ( 'ri' ) , 'cache.ri' )
174+ assert_path_not_exist File . join ( @a . doc_dir ( 'rdoc' ) , 'index.html' )
175+ assert_path_exist File . join ( @a . doc_dir ( 'ri' ) , 'cache.ri' )
170176 end
171177
172178 def test_generate_no_overwrite
@@ -176,8 +182,8 @@ def test_generate_no_overwrite
176182
177183 @hook . generate
178184
179- refute_path_exists File . join ( @a . doc_dir ( 'rdoc' ) , 'index.html' )
180- refute_path_exists File . join ( @a . doc_dir ( 'ri' ) , 'cache.ri' )
185+ assert_path_not_exist File . join ( @a . doc_dir ( 'rdoc' ) , 'index.html' )
186+ assert_path_not_exist File . join ( @a . doc_dir ( 'ri' ) , 'cache.ri' )
181187 end
182188
183189 def test_new_rdoc
@@ -201,7 +207,7 @@ def test_remove
201207 refute @hook . rdoc_installed?
202208 refute @hook . ri_installed?
203209
204- assert_path_exists @a . doc_dir
210+ assert_path_exist @a . doc_dir
205211 end
206212
207213 def test_remove_unwritable
@@ -231,7 +237,7 @@ def test_ri_installed?
231237 def test_setup
232238 @hook . setup
233239
234- assert_path_exists @a . doc_dir
240+ assert_path_exist @a . doc_dir
235241 end
236242
237243 def test_setup_unwritable
0 commit comments