diff options
| author | Jack Nagel | 2013-04-07 18:40:40 -0500 |
|---|---|---|
| committer | Jack Nagel | 2013-04-07 20:59:52 -0500 |
| commit | c816ad70b60f68b4d63a729c6b0a44088ccb1c51 (patch) | |
| tree | f3e726fe89edaba541da66bced6df20916780d61 /Library | |
| parent | 9013b3a0c9c35411ae8c788ab5e104735a99fde2 (diff) | |
| download | brew-c816ad70b60f68b4d63a729c6b0a44088ccb1c51.tar.bz2 | |
Simplify tests
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/test/test_formula.rb | 10 | ||||
| -rw-r--r-- | Library/Homebrew/test/test_formula_install.rb | 8 | ||||
| -rw-r--r-- | Library/Homebrew/test/testball.rb | 2 |
3 files changed, 4 insertions, 16 deletions
diff --git a/Library/Homebrew/test/test_formula.rb b/Library/Homebrew/test/test_formula.rb index 9de2b2eda..e4b207e70 100644 --- a/Library/Homebrew/test/test_formula.rb +++ b/Library/Homebrew/test/test_formula.rb @@ -31,15 +31,7 @@ class FormulaTests < Test::Unit::TestCase def test_cant_override_brew assert_raises(RuntimeError) do - eval <<-EOS - class TestBallOverrideBrew < Formula - def initialize - super "foo" - end - def brew - end - end - EOS + Class.new(Formula) { def brew; end } end end diff --git a/Library/Homebrew/test/test_formula_install.rb b/Library/Homebrew/test/test_formula_install.rb index b63c1f9ee..ea1584ec6 100644 --- a/Library/Homebrew/test/test_formula_install.rb +++ b/Library/Homebrew/test/test_formula_install.rb @@ -19,11 +19,9 @@ end class ConfigureTests < Test::Unit::TestCase def test_detect_failed_configure f = ConfigureFails.new - begin - shutup { f.brew { f.install } } - rescue BuildError => e - assert e.was_running_configure? - end + shutup { f.brew { f.install } } + rescue BuildError => e + assert e.was_running_configure? end end diff --git a/Library/Homebrew/test/testball.rb b/Library/Homebrew/test/testball.rb index 32f307f10..2bc93731f 100644 --- a/Library/Homebrew/test/testball.rb +++ b/Library/Homebrew/test/testball.rb @@ -1,7 +1,6 @@ require 'formula' class TestBall < Formula - # name parameter required for some Formula::factory def initialize name=nil @homepage = 'http://example.com/' @stable ||= SoftwareSpec.new @@ -31,7 +30,6 @@ class TestBallWithMirror < Formula end class ConfigureFails < Formula - # name parameter required for some Formula::factory url "file:///#{TEST_FOLDER}/tarballs/configure_fails.tar.gz" version '1.0.0' sha1 'b36c65e5de86efef1b3a7e9cf78a98c186b400b3' |
