Sha256: aa017d0d3b724306d26285cd8d492a3112d4c91e30efb10aa7a3adb8caddd955

Contents?: true

Size: 973 Bytes

Versions: 29

Compression:

Stored size: 973 Bytes

Contents

# frozen_string_literal: true
require_relative 'helper'

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

29 entries across 29 versions & 1 rubygems

Version Path
rubygems-update-3.2.34 test/rubygems/test_gem_resolver_activation_request.rb
rubygems-update-3.3.18 test/rubygems/test_gem_resolver_activation_request.rb
rubygems-update-3.3.17 test/rubygems/test_gem_resolver_activation_request.rb
rubygems-update-3.3.16 test/rubygems/test_gem_resolver_activation_request.rb
rubygems-update-3.3.15 test/rubygems/test_gem_resolver_activation_request.rb
rubygems-update-3.3.14 test/rubygems/test_gem_resolver_activation_request.rb
rubygems-update-3.3.13 test/rubygems/test_gem_resolver_activation_request.rb
rubygems-update-3.3.12 test/rubygems/test_gem_resolver_activation_request.rb
rubygems-update-3.3.11 test/rubygems/test_gem_resolver_activation_request.rb
rubygems-update-3.3.10 test/rubygems/test_gem_resolver_activation_request.rb
rubygems-update-3.3.9 test/rubygems/test_gem_resolver_activation_request.rb
rubygems-update-3.3.8 test/rubygems/test_gem_resolver_activation_request.rb
rubygems-update-3.3.7 test/rubygems/test_gem_resolver_activation_request.rb
rubygems-update-3.3.6 test/rubygems/test_gem_resolver_activation_request.rb
rubygems-update-3.3.5 test/rubygems/test_gem_resolver_activation_request.rb
rubygems-update-3.3.4 test/rubygems/test_gem_resolver_activation_request.rb
rubygems-update-3.3.3 test/rubygems/test_gem_resolver_activation_request.rb
rubygems-update-3.3.2 test/rubygems/test_gem_resolver_activation_request.rb
rubygems-update-3.3.1 test/rubygems/test_gem_resolver_activation_request.rb
rubygems-update-3.3.0 test/rubygems/test_gem_resolver_activation_request.rb