New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: display a warning when file exists #81
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fine by me as long as the tests are running properly.
capture_stdout { described_class.process(args) } | ||
}).to raise_error("A draft already exists at _drafts/an-existing-draft.md") | ||
it "displays a warning" do | ||
output = capture_stdout { described_class.process(args) } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does abort_with
not kill the test process?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess it does, the tests are passing but are wrong. If I change the string in the test, it still passes. How should I test that we abort?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can simply warn
and return
instead of a hard abort
..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With a simple return
file gets overwritten. I thought this was workin' after testing it locally but this isn't, shouldn't have merged 😕
d7d808d
to
9e8f202
Compare
@jekyllbot: merge +minor |
We shouldn't raise an argument error when a file already exist.
This uses
logger.abort_with
to reflectjekyll new
behavior.