diff options
Diffstat (limited to 'test/rubygems')
-rw-r--r-- | test/rubygems/test_gem_installer.rb | 2 | ||||
-rw-r--r-- | test/rubygems/test_gem_rdoc.rb | 11 |
2 files changed, 11 insertions, 2 deletions
diff --git a/test/rubygems/test_gem_installer.rb b/test/rubygems/test_gem_installer.rb index 6645194021..0683001f33 100644 --- a/test/rubygems/test_gem_installer.rb +++ b/test/rubygems/test_gem_installer.rb @@ -180,7 +180,7 @@ load Gem.bin_path('a', 'executable', version) end conflicted = File.join @gemhome, 'bin', 'executable' - assert_match /\A"executable" from a conflicts with (?:#{Regexp.quote(conflicted)}|installed executable from conflict)\z/, + assert_match %r%\A"executable" from a conflicts with (?:#{Regexp.quote(conflicted)}|installed executable from conflict)\z%, e.message end ensure diff --git a/test/rubygems/test_gem_rdoc.rb b/test/rubygems/test_gem_rdoc.rb index bece6a1782..0285a2fede 100644 --- a/test/rubygems/test_gem_rdoc.rb +++ b/test/rubygems/test_gem_rdoc.rb @@ -34,6 +34,11 @@ class TestGemRDoc < Gem::TestCase # RDoc 4 ships with its own Gem::RDoc which overrides this one which is # shipped for backwards compatibility. + def rdoc_4? + Gem::Requirement.new('>= 4.0.0.preview2').satisfied_by? \ + @hook.class.rdoc_version + end + def rdoc_3? Gem::Requirement.new('~> 3.0').satisfied_by? @hook.class.rdoc_version end @@ -43,7 +48,11 @@ class TestGemRDoc < Gem::TestCase end def test_initialize - refute @hook.generate_rdoc + if rdoc_4? then + refute @hook.generate_rdoc + else + assert @hook.generate_rdoc + end assert @hook.generate_ri rdoc = Gem::RDoc.new @a, false, false |