aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorBaptiste Fontaine2015-03-13 23:47:21 +0100
committerBrett Koonce2015-03-14 19:35:41 -0700
commita0ab5057449b486f285d5aa5183b01fc295d3093 (patch)
tree5af1a80f4e7bc9f28bcf08fbf1ffba73a8dc2bfe /Library
parent8bd129d9c5a2f388fbdeac7bffb03f0f6a769944 (diff)
downloadhomebrew-a0ab5057449b486f285d5aa5183b01fc295d3093.tar.bz2
legit: add test
Closes #37697. Signed-off-by: Brett Koonce <koonce@gmail.com>
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/legit.rb21
1 files changed, 14 insertions, 7 deletions
diff --git a/Library/Formula/legit.rb b/Library/Formula/legit.rb
index 89a2591c1..f30a890c5 100644
--- a/Library/Formula/legit.rb
+++ b/Library/Formula/legit.rb
@@ -1,12 +1,19 @@
-require 'formula'
-
class Legit < Formula
- homepage 'http://www.git-legit.org/'
- url 'https://github.com/downloads/kennethreitz/legit/legit-v0.1.0-darwin-x86.tar.bz2'
- version '0.1.0'
- sha1 'a2cdfb59ab949f14f23784cf6861a50da923f71b'
+ homepage "http://www.git-legit.org/"
+ url "https://github.com/downloads/kennethreitz/legit/legit-v0.1.0-darwin-x86.tar.bz2"
+ version "0.1.0"
+ sha256 "9b25a4c8e12d6703627ba24f4547a7d4350ca1ef9fa44415512b1bcc57b06506"
def install
- bin.install 'legit'
+ bin.install "legit"
+ end
+
+ test do
+ system "git", "init"
+ touch "foo"
+ system "git", "add", "foo"
+ system "git", "commit", "-m", "init"
+ system "#{bin}/legit", "sprout", "test"
+ assert_match(/test/, shell_output("#{bin}/legit branches"))
end
end