Remove keg test dependency on formula
This commit is contained in:
parent
755c786040
commit
1074221a22
@ -1,5 +1,4 @@
|
|||||||
require 'testing_env'
|
require 'testing_env'
|
||||||
require 'test/testball'
|
|
||||||
require 'keg'
|
require 'keg'
|
||||||
require 'stringio'
|
require 'stringio'
|
||||||
|
|
||||||
@ -7,12 +6,15 @@ class LinkTests < Test::Unit::TestCase
|
|||||||
include FileUtils
|
include FileUtils
|
||||||
|
|
||||||
def setup
|
def setup
|
||||||
@formula = TestBall.new
|
@keg = HOMEBREW_CELLAR/"foo/1.0"
|
||||||
shutup do
|
@keg.mkpath
|
||||||
@formula.brew { @formula.install }
|
(@keg/"bin").mkpath
|
||||||
|
|
||||||
|
%w{hiworld helloworld goodbye_cruel_world}.each do |file|
|
||||||
|
touch @keg/"bin/#{file}"
|
||||||
end
|
end
|
||||||
@keg = Keg.for @formula.prefix
|
|
||||||
@keg.unlink
|
@keg = Keg.new(@keg)
|
||||||
|
|
||||||
@mode = OpenStruct.new
|
@mode = OpenStruct.new
|
||||||
|
|
||||||
@ -45,7 +47,7 @@ class LinkTests < Test::Unit::TestCase
|
|||||||
|
|
||||||
def test_linking_fails_when_already_linked
|
def test_linking_fails_when_already_linked
|
||||||
@keg.link
|
@keg.link
|
||||||
assert_raise RuntimeError, "Cannot link testball" do
|
assert_raise RuntimeError do
|
||||||
shutup { @keg.link }
|
shutup { @keg.link }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user