summaryrefslogtreecommitdiff
path: root/test/rubygems/test_gem_resolver_specification.rb
diff options
context:
space:
mode:
authordrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-11-25 19:14:49 +0000
committerdrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-11-25 19:14:49 +0000
commit04817ae6d3e1d898d6fbf09ad146850d26d2b404 (patch)
tree7e5482d13830cacf363d21a087b490588a960095 /test/rubygems/test_gem_resolver_specification.rb
parentc107372597586e1ad0fea03c00a14bdd7205b5d8 (diff)
* lib/rubygems: Update to RubyGems master 612f85a. Notable changes:
Fixed installation and activation of git: and path: gems via Gem.use_gemdeps Improved documentation coverage * test/rubygems: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43845 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/rubygems/test_gem_resolver_specification.rb')
-rw-r--r--test/rubygems/test_gem_resolver_specification.rb32
1 files changed, 32 insertions, 0 deletions
diff --git a/test/rubygems/test_gem_resolver_specification.rb b/test/rubygems/test_gem_resolver_specification.rb
new file mode 100644
index 0000000000..2c9c143cee
--- /dev/null
+++ b/test/rubygems/test_gem_resolver_specification.rb
@@ -0,0 +1,32 @@
+require 'rubygems/test_case'
+
+class TestGemResolverSpecification < Gem::TestCase
+
+ class TestSpec < Gem::Resolver::Specification
+ attr_reader :spec
+
+ def initialize spec
+ super()
+
+ @spec = spec
+ end
+ end
+
+ def test_installable_platform_eh
+ a = util_spec 'a', 1
+
+ a_spec = TestSpec.new a
+
+ assert a_spec.installable_platform?
+
+ b = util_spec 'a', 1 do |s|
+ s.platform = Gem::Platform.new %w[cpu other_platform 1]
+ end
+
+ b_spec = TestSpec.new b
+
+ refute b_spec.installable_platform?
+ end
+
+end
+