Sha256: 86531f0726699a272a805f636195f1e998ccf4d548727460a5813f532a8bd78c

Contents?: true

Size: 978 Bytes

Versions: 11

Compression:

Stored size: 978 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

11 entries across 11 versions & 1 rubygems

Version Path
rubygems-update-3.1.6 test/rubygems/test_gem_resolver_activation_request.rb
rubygems-update-3.1.5 test/rubygems/test_gem_resolver_activation_request.rb
rubygems-update-3.2.0.rc.1 test/rubygems/test_gem_resolver_activation_request.rb
rubygems-update-3.1.4 test/rubygems/test_gem_resolver_activation_request.rb
rubygems-update-3.1.3 test/rubygems/test_gem_resolver_activation_request.rb
rubygems-update-3.1.2 test/rubygems/test_gem_resolver_activation_request.rb
rubygems-update-3.1.1 test/rubygems/test_gem_resolver_activation_request.rb
rubygems-update-3.1.0 test/rubygems/test_gem_resolver_activation_request.rb
rubygems-update-3.1.0.pre3 test/rubygems/test_gem_resolver_activation_request.rb
rubygems-update-3.1.0.pre2 test/rubygems/test_gem_resolver_activation_request.rb
rubygems-update-3.1.0.pre1 test/rubygems/test_gem_resolver_activation_request.rb