Example #1
0
def test_install_ruby_system(fake_gem_prefix):
    ruby.install_environment(fake_gem_prefix, 'system', ())

    # Should be able to activate and use rbenv install
    with ruby.in_env(fake_gem_prefix, 'system'):
        _, out, _ = cmd_output('gem', 'list')
        assert 'pre_commit_placeholder_package' in out
Example #2
0
def test_install_ruby_default(fake_gem_prefix):
    ruby.install_environment(fake_gem_prefix, C.DEFAULT, ())
    # Should have created rbenv directory
    assert os.path.exists(fake_gem_prefix.path('rbenv-default'))

    # Should be able to activate using our script and access rbenv
    with ruby.in_env(fake_gem_prefix, 'default'):
        cmd_output('rbenv', '--help')
Example #3
0
def test_install_ruby_with_version(fake_gem_prefix):
    ruby.install_environment(fake_gem_prefix, '2.7.2', ())

    # Should be able to activate and use rbenv install
    with ruby.in_env(fake_gem_prefix, '2.7.2'):
        cmd_output('rbenv', 'install', '--help')