-
-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
ugit 0.5 (new formula) #90513
ugit 0.5 (new formula) #90513
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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
class Ugit < Formula | ||
desc "🚨️ ugit helps you undo git commands. Your damage control git buddy" | ||
homepage "https://github.com/Bhupesh-V/ugit" | ||
url "https://github.com/Bhupesh-V/ugit/archive/refs/tags/v5.0.tar.gz" | ||
sha256 "f1d603756635675b557cb43eda01443b87f5024aab455283f06a3fd9cfbf2d06" | ||
license "MIT" | ||
|
||
depends_on "bash" | ||
depends_on "fzf" | ||
|
||
def install | ||
bin.install "ugit" | ||
bin.install "git-undo" | ||
end | ||
|
||
test do | ||
assert_match "ugit version", shell_output("#{bin}/ugit --version") | ||
assert_match "ugit help", shell_output("#{bin}/ugit --help") | ||
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. We need a test that exercises the some of the functionality of the app. Version checks or usage checks (foo --version or foo --help) are not sufficient, as explained in the formula cookbook. In most cases, a good test would involve running a simple test case: run #{bin}/foo input.txt.
Some advice for specific cases:
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. It's hard to write tests for ugit now since it doesn't really manual input from a user 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.
Since that checks if it can actually do what it should, that sounds pretty good to me. |
||
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.