diff options
| author | Mike McQuaid | 2014-10-31 22:08:49 +0000 |
|---|---|---|
| committer | Mike McQuaid | 2014-10-31 22:09:21 +0000 |
| commit | a7f3871bcff33cef5613003f548c7ed363f6858b (patch) | |
| tree | 82dbe6aed73e6e591cd42fbc519ec37909f9313e /Library | |
| parent | 44c125d313e90830c442d6322a35a4490c5cf1ee (diff) | |
| download | homebrew-a7f3871bcff33cef5613003f548c7ed363f6858b.tar.bz2 | |
hardlink-osx: Rubyify the test more.
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Formula/hardlink-osx.rb | 16 |
1 files changed, 6 insertions, 10 deletions
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 |
