1
0
mirror of https://github.com/nvbn/thefuck.git synced 2025-09-28 16:12:36 +01:00

Add support of lein "is not task"

This commit is contained in:
nvbn
2015-04-18 23:19:34 +02:00
parent 3440582494
commit 8b2ba5762c
4 changed files with 49 additions and 1 deletions

View File

@@ -0,0 +1,22 @@
import pytest
from mock import Mock
from thefuck.rules.lein_not_task import match, get_new_command
@pytest.fixture
def is_not_task():
return ''''rpl' is not a task. See 'lein help'.
Did you mean this?
repl
'''
def test_match(is_not_task):
assert match(Mock(script='lein rpl', stderr=is_not_task), None)
assert not match(Mock(script='ls', stderr=is_not_task), None)
def test_get_new_command(is_not_task):
assert get_new_command(Mock(script='lein rpl --help', stderr=is_not_task),
None) == 'lein repl --help'