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
 | 
			
		||||
    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
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -19,13 +19,11 @@ 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
 | 
			
		||||
end
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
class InstallTests < Test::Unit::TestCase
 | 
			
		||||
 | 
			
		||||
@ -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'
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user