-
Notifications
You must be signed in to change notification settings - Fork 481
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 dependency constraint on ruby-git #1436
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,14 +43,16 @@ | |
@dm = testing_dangerfile | ||
expect do | ||
@dm.env.scm.diff_for_folder(dir + "/subdir") | ||
end.to raise_error(ArgumentError, /path does not exist/) | ||
end.to raise_error(ArgumentError, /is not the top level git directory/) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Previously My change maintains the current intention to keep the backward compatibility but gives a better error message to educate users. |
||
end | ||
end | ||
|
||
it "looks up the top level git folder when requested" do | ||
with_git_repo do |dir| | ||
@dm = testing_dangerfile | ||
@dm.env.scm.diff_for_folder(dir + "/subdir", lookup_top_level: true) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The previous spec didn't assert anything. I made the expectation explicit. |
||
expect do | ||
@dm.env.scm.diff_for_folder(dir + "/subdir", lookup_top_level: true) | ||
end.not_to raise_error | ||
end | ||
end | ||
end | ||
|
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 extracted logic to raise an error to keep the compatibility, but the behaviour should be the same as before, apart from the error message.