From a7f3871bcff33cef5613003f548c7ed363f6858b Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Fri, 31 Oct 2014 22:08:49 +0000 Subject: hardlink-osx: Rubyify the test more. --- Library/Formula/hardlink-osx.rb | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'Library/Formula') diff --git a/Library/Formula/hardlink-osx.rb b/Library/Formula/hardlink-osx.rb index ac7b86ea5..de7908cdb 100644 --- a/Library/Formula/hardlink-osx.rb +++ b/Library/Formula/hardlink-osx.rb @@ -27,16 +27,12 @@ class HardlinkOsx < Formula end test do - system "mkdir", "-p", "test1/inner" - system "touch", "test1/inner/file" - system "mkdir", "otherdir" + mkdir_p "test1/inner" + touch "test1/inner/file" + mkdir "otherdir" system "#{bin}/hln", "test1", "otherdir/test2" - - system "test", "-d", "otherdir/test2" - assert_equal 0, $?.exitstatus - system "test", "-d", "otherdir/test2/inner" - assert_equal 0, $?.exitstatus - system "test", "-f", "otherdir/test2/inner/file" - assert_equal 0, $?.exitstatus + assert File.directory? "otherdir/test2" + assert File.directory? "otherdir/test2/inner" + assert File.file? "otherdir/test2/inner/file" end end -- cgit v1.2.3