From fbe740860a0a21075bdc30a120d3594831f86306 Mon Sep 17 00:00:00 2001 From: Baptiste Fontaine Date: Fri, 17 Apr 2015 01:45:01 +0200 Subject: vf: test added Closes #38726. Signed-off-by: Xu Cheng --- Library/Formula/vf.rb | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'Library/Formula') diff --git a/Library/Formula/vf.rb b/Library/Formula/vf.rb index a24d8a3f4..6fa3d6b66 100644 --- a/Library/Formula/vf.rb +++ b/Library/Formula/vf.rb @@ -1,16 +1,14 @@ -require 'formula' - class Vf < Formula - homepage 'https://github.com/glejeune/vf' - url 'https://github.com/glejeune/vf/archive/0.0.1.tar.gz' - sha1 '288086b41857c292207f0dc1c69e0f4435e0195b' + homepage "https://github.com/glejeune/vf" + url "https://github.com/glejeune/vf/archive/0.0.1.tar.gz" + sha256 "6418d188b88d5f3885b7a8d24520ac47accadb5144ae24e836aafbea4bd41859" - head 'https://github.com/glejeune/vf.git' + head "https://github.com/glejeune/vf.git" def install # Since the shell file is sourced instead of run # install to prefix instead of bin - prefix.install Dir['*'] + prefix.install Dir["*"] end def caveats; <<-EOS.undent @@ -18,4 +16,9 @@ class Vf < Formula source #{prefix}/vf.sh EOS end + + test do + (testpath/"test").mkpath + assert_equal "cd test", shell_output("ruby #{prefix}/vf.rb test").chomp + end end -- cgit v1.2.3