Simplify tests
This commit is contained in:
parent
9013b3a0c9
commit
c816ad70b6
@ -31,15 +31,7 @@ class FormulaTests < Test::Unit::TestCase
|
|||||||
|
|
||||||
def test_cant_override_brew
|
def test_cant_override_brew
|
||||||
assert_raises(RuntimeError) do
|
assert_raises(RuntimeError) do
|
||||||
eval <<-EOS
|
Class.new(Formula) { def brew; end }
|
||||||
class TestBallOverrideBrew < Formula
|
|
||||||
def initialize
|
|
||||||
super "foo"
|
|
||||||
end
|
|
||||||
def brew
|
|
||||||
end
|
|
||||||
end
|
|
||||||
EOS
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@ -19,11 +19,9 @@ end
|
|||||||
class ConfigureTests < Test::Unit::TestCase
|
class ConfigureTests < Test::Unit::TestCase
|
||||||
def test_detect_failed_configure
|
def test_detect_failed_configure
|
||||||
f = ConfigureFails.new
|
f = ConfigureFails.new
|
||||||
begin
|
shutup { f.brew { f.install } }
|
||||||
shutup { f.brew { f.install } }
|
rescue BuildError => e
|
||||||
rescue BuildError => e
|
assert e.was_running_configure?
|
||||||
assert e.was_running_configure?
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@ -1,7 +1,6 @@
|
|||||||
require 'formula'
|
require 'formula'
|
||||||
|
|
||||||
class TestBall < Formula
|
class TestBall < Formula
|
||||||
# name parameter required for some Formula::factory
|
|
||||||
def initialize name=nil
|
def initialize name=nil
|
||||||
@homepage = 'http://example.com/'
|
@homepage = 'http://example.com/'
|
||||||
@stable ||= SoftwareSpec.new
|
@stable ||= SoftwareSpec.new
|
||||||
@ -31,7 +30,6 @@ class TestBallWithMirror < Formula
|
|||||||
end
|
end
|
||||||
|
|
||||||
class ConfigureFails < Formula
|
class ConfigureFails < Formula
|
||||||
# name parameter required for some Formula::factory
|
|
||||||
url "file:///#{TEST_FOLDER}/tarballs/configure_fails.tar.gz"
|
url "file:///#{TEST_FOLDER}/tarballs/configure_fails.tar.gz"
|
||||||
version '1.0.0'
|
version '1.0.0'
|
||||||
sha1 'b36c65e5de86efef1b3a7e9cf78a98c186b400b3'
|
sha1 'b36c65e5de86efef1b3a7e9cf78a98c186b400b3'
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user