1
0
mirror of https://github.com/nvbn/thefuck.git synced 2025-09-20 04:02:32 +01:00

⚠️ Remove settings param from rules match, get_new_command and side_effect

This commit is contained in:
nvbn
2015-09-07 13:00:29 +03:00
parent 382eb8b86c
commit df4d2cc88d
154 changed files with 535 additions and 465 deletions

View File

@@ -11,18 +11,18 @@ def stdout(task):
def test_match():
assert match(Command('gulp srve', stdout('srve')), None)
assert match(Command('gulp srve', stdout('srve')))
@pytest.mark.parametrize('script, stdout', [
('gulp serve', ''),
('cat srve', stdout('srve'))])
def test_not_march(script, stdout):
assert not match(Command(script, stdout), None)
assert not match(Command(script, stdout))
def test_get_new_command(mocker):
mocker.patch('thefuck.rules.gulp_not_task.get_gulp_tasks', return_value=[
'serve', 'build', 'default'])
command = Command('gulp srve', stdout('srve'))
assert get_new_command(command, None) == ['gulp serve', 'gulp default']
assert get_new_command(command) == ['gulp serve', 'gulp default']