Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 12 additions & 6 deletions test/rdoc/test_rdoc_rubygems_hook.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
require 'rdoc/rubygems_hook'

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
super
Expand Down Expand Up @@ -165,8 +171,8 @@ def test_generate_force

@hook.generate

refute_path_exists File.join(@a.doc_dir('rdoc'), 'index.html')
assert_path_exists File.join(@a.doc_dir('ri'), 'cache.ri')
assert_path_not_exist File.join(@a.doc_dir('rdoc'), 'index.html')
assert_path_exist File.join(@a.doc_dir('ri'), 'cache.ri')
end

def test_generate_no_overwrite
Expand All @@ -176,8 +182,8 @@ def test_generate_no_overwrite

@hook.generate

refute_path_exists 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('rdoc'), 'index.html')
assert_path_not_exist File.join(@a.doc_dir('ri'), 'cache.ri')
end

def test_new_rdoc
Expand All @@ -201,7 +207,7 @@ def test_remove
refute @hook.rdoc_installed?
refute @hook.ri_installed?

assert_path_exists @a.doc_dir
assert_path_exist @a.doc_dir
end

def test_remove_unwritable
Expand Down Expand Up @@ -231,7 +237,7 @@ def test_ri_installed?
def test_setup
@hook.setup

assert_path_exists @a.doc_dir
assert_path_exist @a.doc_dir
end

def test_setup_unwritable
Expand Down