• Download Gist
0002-Test-for-activating-only-inactive-gems.patch
Diff
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
From 3dd6021766f83c43e3365f8d96d51adb7ea4ef1a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@redhat.com>
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

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.