diff options
| author | Jack Nagel | 2014-02-27 14:22:42 -0600 |
|---|---|---|
| committer | Jack Nagel | 2014-02-27 14:22:42 -0600 |
| commit | 96df4fe1da62efe9be9f1a9b5d885672c8f09d75 (patch) | |
| tree | fc3513603c2a7c01c46f1651f37e7ab6c487abe5 /Library/Homebrew/test/test_dependency_expansion.rb | |
| parent | e9b687070a50c6b3e83ad68013ad002723d96158 (diff) | |
| download | brew-96df4fe1da62efe9be9f1a9b5d885672c8f09d75.tar.bz2 | |
Apply cyclic dependency hack unconditionally
Diffstat (limited to 'Library/Homebrew/test/test_dependency_expansion.rb')
| -rw-r--r-- | Library/Homebrew/test/test_dependency_expansion.rb | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Library/Homebrew/test/test_dependency_expansion.rb b/Library/Homebrew/test/test_dependency_expansion.rb index b34cd35f4..08165b2d1 100644 --- a/Library/Homebrew/test/test_dependency_expansion.rb +++ b/Library/Homebrew/test/test_dependency_expansion.rb @@ -4,7 +4,7 @@ require 'dependency' class DependencyExpansionTests < Test::Unit::TestCase def build_dep(name, tags=[], deps=[]) dep = Dependency.new(name.to_s, tags) - dep.stubs(:to_formula).returns(stub(:deps => deps)) + dep.stubs(:to_formula).returns(stub(:deps => deps, :name => name)) dep end @@ -14,7 +14,7 @@ class DependencyExpansionTests < Test::Unit::TestCase @baz = build_dep(:baz) @qux = build_dep(:qux) @deps = [@foo, @bar, @baz, @qux] - @f = stub(:deps => @deps) + @f = stub(:deps => @deps, :name => "f") end def test_expand_yields_dependent_and_dep_pairs @@ -43,19 +43,19 @@ class DependencyExpansionTests < Test::Unit::TestCase end def test_expand_preserves_dependency_order - @foo.stubs(:to_formula).returns(stub(:deps => [@qux, @baz])) + @foo.stubs(:to_formula).returns(stub(:name => "f", :deps => [@qux, @baz])) assert_equal [@qux, @baz, @foo, @bar], Dependency.expand(@f) end def test_expand_skips_optionals_by_default @foo.expects(:optional?).returns(true) - @f = stub(:deps => @deps, :build => stub(:with? => false)) + @f = stub(:deps => @deps, :build => stub(:with? => false), :name => "f") assert_equal [@bar, @baz, @qux], Dependency.expand(@f) end def test_expand_keeps_recommendeds_by_default @foo.expects(:recommended?).returns(true) - @f = stub(:deps => @deps, :build => stub(:with? => true)) + @f = stub(:deps => @deps, :build => stub(:with? => true), :name => "f") assert_equal @deps, Dependency.expand(@f) end @@ -84,7 +84,7 @@ class DependencyExpansionTests < Test::Unit::TestCase end def test_skip_skips_parent_but_yields_children - f = stub(:deps => [ + f = stub(:name => "f", :deps => [ build_dep(:foo, [], [@bar, @baz]), build_dep(:foo, [], [@baz]), ]) @@ -97,7 +97,7 @@ class DependencyExpansionTests < Test::Unit::TestCase end def test_keep_dep_but_prune_recursive_deps - f = stub(:deps => [ + f = stub(:name => "f", :deps => [ build_dep(:foo, [:build], [@bar]), build_dep(:baz, [:build]), ]) |
