aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew
diff options
context:
space:
mode:
authorJack Nagel2013-04-02 15:33:34 -0500
committerJack Nagel2013-04-02 15:33:34 -0500
commitc3d48b5d8a6379da71a80d75da697e0f9b188181 (patch)
tree259fe1c0fff1dee017b40744384b4389fc34138f /Library/Homebrew
parent207f24be078490ad57f89e65ca1021cfd1c5384b (diff)
downloadbrew-c3d48b5d8a6379da71a80d75da697e0f9b188181.tar.bz2
Don't use "assert_not_nil"
Diffstat (limited to 'Library/Homebrew')
-rw-r--r--Library/Homebrew/test/test_dependency_collector.rb4
-rw-r--r--Library/Homebrew/test/test_formula.rb9
2 files changed, 5 insertions, 8 deletions
diff --git a/Library/Homebrew/test/test_dependency_collector.rb b/Library/Homebrew/test/test_dependency_collector.rb
index 6500afca3..7067b95e5 100644
--- a/Library/Homebrew/test/test_dependency_collector.rb
+++ b/Library/Homebrew/test/test_dependency_collector.rb
@@ -20,7 +20,7 @@ class DependencyCollectorTests < Test::Unit::TestCase
def test_dependency_creation
@d.add 'foo' => :build
@d.add 'bar' => ['--universal', :optional]
- assert_not_nil @d.find_dependency('foo')
+ assert_instance_of Dependency, @d.find_dependency('foo')
assert_equal 2, @d.find_dependency('bar').tags.length
end
@@ -45,7 +45,7 @@ class DependencyCollectorTests < Test::Unit::TestCase
def test_requirement_creation
@d.add :x11
- assert_not_nil @d.find_requirement(X11Dependency)
+ assert_instance_of X11Dependency, @d.find_requirement(X11Dependency)
end
def test_no_duplicate_requirements
diff --git a/Library/Homebrew/test/test_formula.rb b/Library/Homebrew/test/test_formula.rb
index 33b59f93e..9de2b2eda 100644
--- a/Library/Homebrew/test/test_formula.rb
+++ b/Library/Homebrew/test/test_formula.rb
@@ -160,7 +160,6 @@ class FormulaTests < Test::Unit::TestCase
def test_head_only_specs
f = HeadOnlySpecTestBall.new
- assert_not_nil f.head
assert_nil f.stable
assert_nil f.bottle
assert_nil f.devel
@@ -177,7 +176,6 @@ class FormulaTests < Test::Unit::TestCase
def test_incomplete_stable_specs
f = IncompleteStableSpecTestBall.new
- assert_not_nil f.head
assert_nil f.stable
assert_nil f.bottle
assert_nil f.devel
@@ -194,7 +192,6 @@ class FormulaTests < Test::Unit::TestCase
def test_head_only_with_version_specs
f = IncompleteStableSpecTestBall.new
- assert_not_nil f.head
assert_nil f.stable
assert_nil f.bottle
assert_nil f.devel
@@ -211,9 +208,9 @@ class FormulaTests < Test::Unit::TestCase
def test_explicit_strategy_specs
f = ExplicitStrategySpecTestBall.new
- assert_not_nil f.stable
- assert_not_nil f.devel
- assert_not_nil f.head
+ assert_instance_of SoftwareSpec, f.stable
+ assert_instance_of SoftwareSpec, f.devel
+ assert_instance_of HeadSoftwareSpec, f.head
assert_equal f.stable, f.active_spec