diff options
Diffstat (limited to 'test/rubygems/test_gem_resolver_specification.rb')
-rw-r--r-- | test/rubygems/test_gem_resolver_specification.rb | 32 |
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 + |