I tried to write tests for #60, but figured out that title tests don't work at all because remove_first_line removes the actual title line to test.
I can prove it without manual testing:
The occupied space by a month and a day in CURRENT_DATE changes every month (/day), and the count of spaces for padding in the title should change too from time to time. If it worked as expected, it would fail, at least in some short months (June / July).
Here I use Regex to work around this problem.
I didn't sort out how I can add more information "why the test has failed", so I did it by @error
There is how it looks like:
I hope there is another way to give a fail context
I tried to write tests for #60, but figured out that title tests don't work at all because
remove_first_line
removes the actual title line to test.I can prove it without manual testing: The occupied space by a month and a day in
CURRENT_DATE
changes every month (/day), and the count of spaces for padding in the title should change too from time to time. If it worked as expected, it would fail, at least in some short months (June / July).Here I use Regex to work around this problem.
I didn't sort out how I can add more information "why the test has failed", so I did it by
@error
There is how it looks like:
I hope there is another way to give a fail context