class GitAbsorb < Formula desc "Automatic git commit --fixup" homepage "https://github.com/tummychow/git-absorb" url "https://github.com/tummychow/git-absorb/archive/0.3.0.tar.gz" sha256 "94d540a7febd37cd74e95e7cab71ee3514df020989208ce3fe83560699072730" depends_on "rust" => :build def install system "cargo", "install", "--root", prefix, "--path", "." end test do (testpath/".gitconfig").write <<~EOS [user] name = Real Person email = notacat@hotmail.cat EOS system "git", "init" (testpath/"test").write "foo" system "git", "add", "test" system "git", "commit", "--message", "Initial commit" (testpath/"test").delete (testpath/"test").write "bar" system "git", "add", "test" system "git", "absorb" end end