tests: clean up whitespace

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
This commit is contained in:
Jack Nagel 2012-06-20 00:51:01 -05:00
parent 40b531deb1
commit 93f8c71e21
16 changed files with 76 additions and 86 deletions

View File

@ -1,7 +1,7 @@
require 'testing_env'
require 'test/testball'
class MockFormula <Formula
class MockFormula < Formula
def initialize url
@url=url
@homepage = 'http://example.com/'
@ -9,7 +9,7 @@ class MockFormula <Formula
end
end
class TestZip <Formula
class TestZip < Formula
def initialize
zip=HOMEBREW_CACHE.parent+'test-0.1.zip'
Kernel.system '/usr/bin/zip', '-q', '-0', zip, ABS__FILE__

View File

@ -5,7 +5,7 @@ class AbstractDownloadStrategy
attr_reader :url
end
class MostlyAbstractFormula <Formula
class MostlyAbstractFormula < Formula
@url=''
@homepage = 'http://example.com/'
end
@ -32,7 +32,7 @@ class FormulaTests < Test::Unit::TestCase
def test_cant_override_brew
assert_raises(RuntimeError) do
eval <<-EOS
class TestBallOverrideBrew <Formula
class TestBallOverrideBrew < Formula
def initialize
super "foo"
end

View File

@ -4,7 +4,7 @@ require 'test/testball'
require 'keg'
class TestScriptFileFormula <ScriptFileFormula
class TestScriptFileFormula < ScriptFileFormula
url "file:///#{Pathname.new(ABS__FILE__).realpath}"
version "1"

View File

@ -136,12 +136,6 @@ class MachOPathnameTests < Test::Unit::TestCase
end
class TextExecutableTests < Test::Unit::TestCase
TMPDIR = HOMEBREW_PREFIX/'tmp'
def setup
FileUtils.mkdir_p TMPDIR
end
def test_simple_shebang
pn = Pathname.new('foo')
pn.write '#!/bin/sh'
@ -189,8 +183,4 @@ class TextExecutableTests < Test::Unit::TestCase
assert pn.arch == :dunno
assert_no_match /text executable/, file(pn)
end
def teardown
TMPDIR.rmtree
end
end

View File

@ -2,26 +2,26 @@ require 'testing_env'
require 'test/testball'
class DefaultPatchBall <TestBall
class DefaultPatchBall < TestBall
def patches
# Default is p1
"file:///#{TEST_FOLDER}/patches/noop-a.diff"
end
end
class ListPatchBall <TestBall
class ListPatchBall < TestBall
def patches
["file:///#{TEST_FOLDER}/patches/noop-a.diff"]
end
end
class P0PatchBall <TestBall
class P0PatchBall < TestBall
def patches
{ :p0 => ["file:///#{TEST_FOLDER}/patches/noop-b.diff"] }
end
end
class P1PatchBall <TestBall
class P1PatchBall < TestBall
def patches
{ :p1 => ["file:///#{TEST_FOLDER}/patches/noop-a.diff"] }
end

View File

@ -1,7 +1,7 @@
require 'testing_env'
require 'extend/string'
class StringTest <Test::Unit::TestCase
class StringTest < Test::Unit::TestCase
def test_undent
undented = <<-EOS.undent
hi

View File

@ -2,7 +2,7 @@ require 'testing_env'
require 'formula'
require 'test/testball'
class MockFormula <Formula
class MockFormula < Formula
def initialize url
@url=url
@homepage = 'http://example.com/'
@ -10,7 +10,7 @@ class MockFormula <Formula
end
end
class TestBadVersion <TestBall
class TestBadVersion < TestBall
@version="versions can't have spaces"
end

View File

@ -1,6 +1,6 @@
require 'formula'
class TestBall <Formula
class TestBall < Formula
# name parameter required for some Formula::factory
def initialize name=nil
@url="file:///#{TEST_FOLDER}/tarballs/testball-0.1.tbz"
@ -32,7 +32,7 @@ class TestBallWithMirror < Formula
end
end
class ConfigureFails <Formula
class ConfigureFails < Formula
# name parameter required for some Formula::factory
def initialize name=nil
@url="file:///#{TEST_FOLDER}/tarballs/configure_fails.tar.gz"