From 53704658b2158746ef830751c90a12ac0c3692c2 Mon Sep 17 00:00:00 2001 From: Gabriel Abramzon Date: Fri, 30 Aug 2019 14:40:17 +0300 Subject: [PATCH] naming --- tests/rules/test_rbenv_install.py | 6 +++--- thefuck/rules/rbenv_install.py | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/rules/test_rbenv_install.py b/tests/rules/test_rbenv_install.py index a585d0a9..28595725 100644 --- a/tests/rules/test_rbenv_install.py +++ b/tests/rules/test_rbenv_install.py @@ -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 diff --git a/thefuck/rules/rbenv_install.py b/thefuck/rules/rbenv_install.py index 93af73c7..af69f8b8 100644 --- a/thefuck/rules/rbenv_install.py +++ b/thefuck/rules/rbenv_install.py @@ -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)