aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/test/test_formula_install.rb
diff options
context:
space:
mode:
authorJack Nagel2014-06-11 12:21:03 -0500
committerJack Nagel2014-06-18 20:34:09 -0500
commit07535c52e7a314a880933e489ea80fd3ccc43af2 (patch)
tree50c2514863f51f40eaf5c0424fc4592ec195e527 /Library/Homebrew/test/test_formula_install.rb
parent16884ea08e115723ca595bf29389cddef54f9c63 (diff)
downloadhomebrew-07535c52e7a314a880933e489ea80fd3ccc43af2.tar.bz2
Use assert_predicate
Diffstat (limited to 'Library/Homebrew/test/test_formula_install.rb')
-rw-r--r--Library/Homebrew/test/test_formula_install.rb23
1 files changed, 12 insertions, 11 deletions
diff --git a/Library/Homebrew/test/test_formula_install.rb b/Library/Homebrew/test/test_formula_install.rb
index c75d18440..8cd11045e 100644
--- a/Library/Homebrew/test/test_formula_install.rb
+++ b/Library/Homebrew/test/test_formula_install.rb
@@ -24,31 +24,32 @@ class InstallTests < Homebrew::TestCase
keg.uninstall
end
- assert !keg.exist?
- assert !f.installed?
+ refute_predicate keg, :exist?
+ refute_predicate f, :installed?
end
def test_a_basic_install
f=TestBall.new
- assert !f.installed?
+ refute_predicate f, :installed?
temporary_install f do
-
# Test that things made it into the Keg
- assert f.bin.directory?
+ assert_predicate f.bin, :directory?
assert_equal 3, f.bin.children.length
- libexec=f.prefix+'libexec'
- assert libexec.directory?
+
+ libexec = f.prefix+'libexec'
+ assert_predicate libexec, :directory?
assert_equal 1, libexec.children.length
- assert !(f.prefix+'main.c').exist?
- assert f.installed?
+
+ refute_predicate f.prefix+'main.c', :exist?
+ assert_predicate f, :installed?
# Test that things make it into the Cellar
- keg=Keg.new f.prefix
+ keg = Keg.new f.prefix
keg.link
assert_equal 3, HOMEBREW_PREFIX.children.length
- assert((HOMEBREW_PREFIX+'bin').directory?)
+ assert_predicate HOMEBREW_PREFIX+'bin', :directory?
assert_equal 3, (HOMEBREW_PREFIX+'bin').children.length
end
end