mirror of
https://github.com/nvbn/thefuck.git
synced 2025-01-18 20:11:17 +00:00
#N/A Completely test rules.gulp_not_task
This commit is contained in:
parent
3438d6dde7
commit
052f415d94
@ -1,4 +1,5 @@
|
||||
import pytest
|
||||
from io import BytesIO
|
||||
from tests.utils import Command
|
||||
from thefuck.rules.gulp_not_task import match, get_new_command
|
||||
|
||||
@ -22,7 +23,7 @@ def test_not_march(script, stdout):
|
||||
|
||||
|
||||
def test_get_new_command(mocker):
|
||||
mocker.patch('thefuck.rules.gulp_not_task.get_gulp_tasks', return_value=[
|
||||
'serve', 'build', 'default'])
|
||||
mock = mocker.patch('subprocess.Popen')
|
||||
mock.return_value.stdout = BytesIO(b'serve \nbuild \ndefault \n')
|
||||
command = Command('gulp srve', stdout('srve'))
|
||||
assert get_new_command(command) == ['gulp serve', 'gulp default']
|
||||
|
Loading…
x
Reference in New Issue
Block a user