diff options
author | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-12-19 07:19:10 +0000 |
---|---|---|
committer | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-12-19 07:19:10 +0000 |
commit | eddc0685f224a6de2f5a6bdaab7f87562192ba7f (patch) | |
tree | 54f3427a70f2cc21e9dbbb6c3ad9ed500ea96865 /lib/rubygems/test_case.rb | |
parent | 1b2be1f8ca5286a75d9401f96eaec89317353e3e (diff) | |
download | ruby-eddc0685f224a6de2f5a6bdaab7f87562192ba7f.tar.gz |
* lib/rubygems/commands/query_command.rb: Refactored to improve
maintainability.
* test/rubygems/test_gem_commands_query_command.rb: Note default gems
in gem list details.
* lib/rubygems/uninstaller.rb: Detect all gems for uninstallation.
This allows duplicate installs of default gems to be removed.
* lib/rubygems/specification.rb: Allow use of ::each_spec.
* lib/rubygems/test_case.rb: Added install_default_gems.
* test/rubygems/test_gem_commands_uninstall_command.rb: Moved test
down to the uninstaller tests.
* test/rubygems/test_gem_uninstaller.rb: Test for uninstallation of
default gems and duplicate default gems.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38461 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rubygems/test_case.rb')
-rw-r--r-- | lib/rubygems/test_case.rb | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/lib/rubygems/test_case.rb b/lib/rubygems/test_case.rb index a652cecf2a..a04c733ccf 100644 --- a/lib/rubygems/test_case.rb +++ b/lib/rubygems/test_case.rb @@ -466,6 +466,19 @@ class Gem::TestCase < MiniTest::Unit::TestCase end ## + # Installs the provided default specs including writing the spec file + + def install_default_gems(*specs) + install_default_specs(*specs) + + specs.each do |spec| + open spec.loaded_from, 'w' do |io| + io.write spec.to_ruby_for_cache + end + end + end + + ## # Install the provided default specs def install_default_specs(*specs) @@ -572,7 +585,7 @@ class Gem::TestCase < MiniTest::Unit::TestCase block = proc do |s| # Since Hash#each is unordered in 1.8, sort # the keys and iterate that way so the tests are - # deteriminstic on all implementations. + # deterministic on all implementations. deps.keys.sort.each do |n| s.add_dependency n, (deps[n] || '>= 0') end |