aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/test/test_dependencies.rb
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Homebrew/test/test_dependencies.rb')
-rw-r--r--Library/Homebrew/test/test_dependencies.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/Library/Homebrew/test/test_dependencies.rb b/Library/Homebrew/test/test_dependencies.rb
index b587cd12a..7e4812ff7 100644
--- a/Library/Homebrew/test/test_dependencies.rb
+++ b/Library/Homebrew/test/test_dependencies.rb
@@ -71,6 +71,20 @@ class DependenciesTests < Homebrew::TestCase
refute_equal a, b
refute_eql a, b
end
+
+ def test_empty
+ a = Dependencies.new
+ assert a.empty?
+ a << Dependency.new("foo")
+ refute a.empty?
+ end
+
+ def test_inspect
+ a = Dependencies.new
+ assert_equal "#<Dependencies: []>", a.inspect
+ a << Dependency.new("foo")
+ assert_equal "#<Dependencies: [#<Dependency: \"foo\" []>]>", a.inspect
+ end
end
class RequirementsTests < Homebrew::TestCase