1
0
mirror of https://github.com/nvbn/thefuck.git synced 2025-01-18 20:11:17 +00:00
This commit is contained in:
Gabriel Abramzon 2019-08-30 14:40:17 +03:00
parent cc5ee9caae
commit 53704658b2
2 changed files with 5 additions and 5 deletions

View File

@ -2,14 +2,14 @@ import pytest
from thefuck.rules.rbenv_install import match, get_new_command
from thefuck.types import Command
expected_new_command = """cd /home/alex/.rbenv/plugins/ruby-build && git pull && cd -"""
expected_actual_command = """cd /home/alex/.rbenv/plugins/ruby-build && git pull && cd -"""
expected_output = """ruby-build: definition not found: 2.6.1
See all available versions with `rbenv install --list'.
If the version you need is missing, try upgrading ruby-build:
%s""" % expected_new_command
%s""" % expected_actual_command
@pytest.mark.parametrize('script, output', [
@ -20,6 +20,6 @@ def test_match(script, output):
@pytest.mark.parametrize('command, new_command', [
(Command('rbenv install 2.6.1', expected_output), expected_new_command)])
(Command('rbenv install 2.6.1', expected_output), expected_actual_command)])
def test_get_new_command(command, new_command):
assert get_new_command(command) == new_command

View File

@ -10,5 +10,5 @@ def match(command):
def get_new_command(command):
output = command.output.split('\n')[-1].lstrip()
return shell.to_shell(output)
actualCommand = command.output.split('\n')[-1].lstrip()
return shell.to_shell(actualCommand)