diff --git a/features/regression.feature b/features/regression.feature new file mode 100644 index 00000000..c4cf41e7 --- /dev/null +++ b/features/regression.feature @@ -0,0 +1,8 @@ +Feature: Zapped bugs should stay dead. + + Scenario: Writing an entry does not print the entire journal + Given we use the config "basic.json" + When we run "jrnl 23 july 2013: A cold and stormy day. I ate crisps on the sofa." + Then we should see the message "Entry added" + When we run "jrnl -n 1" + Then the output should not contain "Life is good" diff --git a/features/steps/core.py b/features/steps/core.py index bceab051..f6c54564 100644 --- a/features/steps/core.py +++ b/features/steps/core.py @@ -102,6 +102,11 @@ def check_output_inline(context, text): out = context.stdout_capture.getvalue() assert text in out +@then('the output should not contain "{text}"') +def check_output_not_inline(context, text): + out = context.stdout_capture.getvalue() + assert text not in out + @then('we should see the message "{text}"') def check_message(context, text): out = context.messages.getvalue()