Sha256: f648dd5cd2a2562c8be31c22418211ce3d740d1198d77c2be4cabfb1661787cf

Contents?: true

Size: 976 Bytes

Versions: 26

Compression:

Stored size: 976 Bytes

Contents

# frozen_string_literal: true
require 'rubygems/test_case'

class TestGemResolverActivationRequest < Gem::TestCase
  def setup
    super

    @DR = Gem::Resolver

    @dep = @DR::DependencyRequest.new dep('a', '>= 0'), nil

    source   = Gem::Source::Local.new
    platform = Gem::Platform::RUBY

    @a3 = @DR::IndexSpecification.new nil, 'a', v(3), source, platform

    @req = @DR::ActivationRequest.new @a3, @dep
  end

  def test_development_eh
    refute @req.development?

    dep_req = @DR::DependencyRequest.new dep('a', '>= 0', :development), nil

    act_req = @DR::ActivationRequest.new @a3, dep_req

    assert act_req.development?
  end

  def test_inspect
    assert_match 'a-3',                         @req.inspect
    assert_match 'from a (>= 0)',               @req.inspect
  end

  def test_installed_eh
    v_spec = Gem::Resolver::VendorSpecification.new nil, @a3

    @req = @DR::ActivationRequest.new v_spec, @dep

    assert @req.installed?
  end
end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
rubygems-update-3.2.24 test/rubygems/test_gem_resolver_activation_request.rb
rubygems-update-3.2.23 test/rubygems/test_gem_resolver_activation_request.rb
rubygems-update-3.2.22 test/rubygems/test_gem_resolver_activation_request.rb
rubygems-update-3.2.21 test/rubygems/test_gem_resolver_activation_request.rb
rubygems-update-3.2.20 test/rubygems/test_gem_resolver_activation_request.rb
rubygems-update-3.2.19 test/rubygems/test_gem_resolver_activation_request.rb
rubygems-update-3.2.18 test/rubygems/test_gem_resolver_activation_request.rb
rubygems-update-3.2.17 test/rubygems/test_gem_resolver_activation_request.rb
rubygems-update-3.2.16 test/rubygems/test_gem_resolver_activation_request.rb
rubygems-update-3.2.15 test/rubygems/test_gem_resolver_activation_request.rb
rubygems-update-3.2.14 test/rubygems/test_gem_resolver_activation_request.rb
rubygems-update-3.2.13 test/rubygems/test_gem_resolver_activation_request.rb
rubygems-update-3.2.12 test/rubygems/test_gem_resolver_activation_request.rb
rubygems-update-3.2.11 test/rubygems/test_gem_resolver_activation_request.rb
rubygems-update-3.2.10 test/rubygems/test_gem_resolver_activation_request.rb
rubygems-update-3.2.9 test/rubygems/test_gem_resolver_activation_request.rb
rubygems-update-3.2.8 test/rubygems/test_gem_resolver_activation_request.rb
rubygems-update-3.2.7 test/rubygems/test_gem_resolver_activation_request.rb
rubygems-update-3.2.6 test/rubygems/test_gem_resolver_activation_request.rb
rubygems-update-3.2.5 test/rubygems/test_gem_resolver_activation_request.rb