Created
December 16, 2011 13:39
-
-
Save voxik/1486087 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 3dd6021766f83c43e3365f8d96d51adb7ea4ef1a Mon Sep 17 00:00:00 2001 | |
From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <[email protected]> | |
Date: Fri, 16 Dec 2011 14:38:27 +0100 | |
Subject: [PATCH 2/2] Test for activating only inactive gems. | |
--- | |
test/rubygems/test_gem_specification.rb | 10 ++++++++++ | |
1 files changed, 10 insertions(+), 0 deletions(-) | |
diff --git a/test/rubygems/test_gem_specification.rb b/test/rubygems/test_gem_specification.rb | |
index f1def67..8b601ac 100644 | |
--- a/test/rubygems/test_gem_specification.rb | |
+++ b/test/rubygems/test_gem_specification.rb | |
@@ -496,6 +496,16 @@ bindir: | |
end | |
end | |
+ def test_find_inactive_by_path | |
+ a = new_spec "foo", "1", nil, "lib/foo.rb" | |
+ | |
+ install_specs a | |
+ | |
+ assert_equal a, Gem::Specification.find_inactive_by_path('foo') | |
+ a.activate | |
+ assert_equal nil, Gem::Specification.find_inactive_by_path('foo') | |
+ end | |
+ | |
def test_add_dependency_with_explicit_type | |
gem = quick_spec "awesome", "1.0" do |awesome| | |
awesome.add_development_dependency "monkey" | |
-- | |
1.7.7.4 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment