From 65aeea857ef3e4934e25f5eb2675abe4520a7d77 Mon Sep 17 00:00:00 2001 From: SanketDG Date: Fri, 8 May 2015 00:15:57 +0530 Subject: [PATCH] add tests for man_no_space --- tests/rules/test_man_no_space.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 tests/rules/test_man_no_space.py diff --git a/tests/rules/test_man_no_space.py b/tests/rules/test_man_no_space.py new file mode 100644 index 00000000..669ebb85 --- /dev/null +++ b/tests/rules/test_man_no_space.py @@ -0,0 +1,12 @@ +from thefuck.rules.man_no_space import match, get_new_command +from tests.utils import Command + + +def test_match(): + assert match(Command('mandiff', stderr='mandiff: command not found'), None) + assert not match(Command(), None) + + +def test_get_new_command(): + assert get_new_command( + Command('mandiff'), None) == 'man diff'