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

@ -20,9 +20,9 @@ class ARGVTests < Test::Unit::TestCase
def test_ARGV def test_ARGV
assert ARGV.named.empty? assert ARGV.named.empty?
(HOMEBREW_CELLAR+'mxcl/10.0').mkpath (HOMEBREW_CELLAR+'mxcl/10.0').mkpath
ARGV.reset ARGV.reset
ARGV.unshift 'mxcl' ARGV.unshift 'mxcl'
assert_equal 1, ARGV.named.length assert_equal 1, ARGV.named.length

View File

@ -1,6 +1,6 @@
require 'testing_env' require 'testing_env'
require 'hardware' require 'hardware'
class EnvironmentTests < Test::Unit::TestCase class EnvironmentTests < Test::Unit::TestCase
def test_ENV_options def test_ENV_options
ENV.gcc_4_0 ENV.gcc_4_0

View File

@ -1,7 +1,7 @@
require 'testing_env' require 'testing_env'
require 'test/testball' require 'test/testball'
class MockFormula <Formula class MockFormula < Formula
def initialize url def initialize url
@url=url @url=url
@homepage = 'http://example.com/' @homepage = 'http://example.com/'
@ -9,7 +9,7 @@ class MockFormula <Formula
end end
end end
class TestZip <Formula class TestZip < Formula
def initialize def initialize
zip=HOMEBREW_CACHE.parent+'test-0.1.zip' zip=HOMEBREW_CACHE.parent+'test-0.1.zip'
Kernel.system '/usr/bin/zip', '-q', '-0', zip, ABS__FILE__ Kernel.system '/usr/bin/zip', '-q', '-0', zip, ABS__FILE__
@ -39,7 +39,7 @@ class BeerTasting < Test::Unit::TestCase
def test_formula_funcs def test_formula_funcs
classname=Formula.class_s(FOOBAR) classname=Formula.class_s(FOOBAR)
path=Formula.path(FOOBAR) path=Formula.path(FOOBAR)
assert_equal "FooBar", classname assert_equal "FooBar", classname
assert_match Regexp.new("^#{HOMEBREW_PREFIX}/Library/Formula"), path.to_s assert_match Regexp.new("^#{HOMEBREW_PREFIX}/Library/Formula"), path.to_s
@ -57,14 +57,14 @@ class BeerTasting < Test::Unit::TestCase
end end
} }
end end
assert_not_nil Formula.factory(FOOBAR) assert_not_nil Formula.factory(FOOBAR)
end end
def test_zip def test_zip
nostdout { assert_nothing_raised { TestZip.new.brew {} } } nostdout { assert_nothing_raised { TestZip.new.brew {} } }
end end
# needs resurrecting # needs resurrecting
# def test_no_ARGV_dupes # def test_no_ARGV_dupes
# ARGV.reset # ARGV.reset
@ -73,7 +73,7 @@ class BeerTasting < Test::Unit::TestCase
# ARGV.named.each{|f| n+=1 if f == 'foo'} # ARGV.named.each{|f| n+=1 if f == 'foo'}
# assert_equal 1, n # assert_equal 1, n
# end # end
def test_brew_h def test_brew_h
require 'cmd/info' require 'cmd/info'
require 'cmd/prune' require 'cmd/prune'
@ -135,13 +135,13 @@ class BeerTasting < Test::Unit::TestCase
d.mkpath d.mkpath
assert_equal '0.1.9', d.version assert_equal '0.1.9', d.version
end end
def test_pathname_plus_yeast def test_pathname_plus_yeast
nostdout do nostdout do
assert_nothing_raised do assert_nothing_raised do
assert !Pathname.getwd.rmdir_if_possible assert !Pathname.getwd.rmdir_if_possible
assert !Pathname.getwd.abv.empty? assert !Pathname.getwd.abv.empty?
abcd=orig_abcd=HOMEBREW_CACHE+'abcd' abcd=orig_abcd=HOMEBREW_CACHE+'abcd'
FileUtils.cp ABS__FILE__, abcd FileUtils.cp ABS__FILE__, abcd
installed_paths=HOMEBREW_PREFIX.install abcd installed_paths=HOMEBREW_PREFIX.install abcd
@ -154,7 +154,7 @@ class BeerTasting < Test::Unit::TestCase
abcd.unlink abcd.unlink
abcd.write 'HELLOWORLD' abcd.write 'HELLOWORLD'
assert_equal 'HELLOWORLD', File.read(abcd) assert_equal 'HELLOWORLD', File.read(abcd)
assert !orig_abcd.exist? assert !orig_abcd.exist?
rv=abcd.cp orig_abcd rv=abcd.cp orig_abcd
assert orig_abcd.exist? assert orig_abcd.exist?
@ -171,10 +171,10 @@ class BeerTasting < Test::Unit::TestCase
end end
end end
end end
def test_pathname_properties def test_pathname_properties
foo1 = HOMEBREW_CACHE/'foo-0.1.tar.gz' foo1 = HOMEBREW_CACHE/'foo-0.1.tar.gz'
assert_equal '.tar.gz', foo1.extname assert_equal '.tar.gz', foo1.extname
assert_equal 'foo-0.1', foo1.stem assert_equal 'foo-0.1', foo1.stem
assert_equal '0.1', foo1.version assert_equal '0.1', foo1.version

View File

@ -5,26 +5,26 @@ class ChecksumTests < Test::Unit::TestCase
def good_checksum f def good_checksum f
assert_nothing_raised { nostdout { f.new.brew {} } } assert_nothing_raised { nostdout { f.new.brew {} } }
end end
def bad_checksum f def bad_checksum f
assert_raises ChecksumMismatchError do assert_raises ChecksumMismatchError do
nostdout { f.new.brew {} } nostdout { f.new.brew {} }
end end
end end
def test_md5 def test_md5
valid_md5 = Class.new(TestBall) do valid_md5 = Class.new(TestBall) do
@md5='060844753f2a3b36ecfc3192d307dab2' @md5='060844753f2a3b36ecfc3192d307dab2'
end end
good_checksum valid_md5 good_checksum valid_md5
end end
def test_badmd5 def test_badmd5
invalid_md5 = Class.new(TestBall) do invalid_md5 = Class.new(TestBall) do
@md5='61aa838a9e4050d1876a295a9e62cbe6' @md5='61aa838a9e4050d1876a295a9e62cbe6'
end end
bad_checksum invalid_md5 bad_checksum invalid_md5
end end
@ -32,7 +32,7 @@ class ChecksumTests < Test::Unit::TestCase
valid_sha1 = Class.new(TestBall) do valid_sha1 = Class.new(TestBall) do
@sha1='482e737739d946b7c8cbaf127d9ee9c148b999f5' @sha1='482e737739d946b7c8cbaf127d9ee9c148b999f5'
end end
good_checksum valid_sha1 good_checksum valid_sha1
end end
@ -40,7 +40,7 @@ class ChecksumTests < Test::Unit::TestCase
invalid_sha1 = Class.new(TestBall) do invalid_sha1 = Class.new(TestBall) do
@sha1='7ea8a98acb8f918df723c2ae73fe67d5664bfd7e' @sha1='7ea8a98acb8f918df723c2ae73fe67d5664bfd7e'
end end
bad_checksum invalid_sha1 bad_checksum invalid_sha1
end end
@ -48,7 +48,7 @@ class ChecksumTests < Test::Unit::TestCase
valid_sha256 = Class.new(TestBall) do valid_sha256 = Class.new(TestBall) do
@sha256='1dfb13ce0f6143fe675b525fc9e168adb2215c5d5965c9f57306bb993170914f' @sha256='1dfb13ce0f6143fe675b525fc9e168adb2215c5d5965c9f57306bb993170914f'
end end
good_checksum valid_sha256 good_checksum valid_sha256
end end
@ -56,7 +56,7 @@ class ChecksumTests < Test::Unit::TestCase
invalid_sha256 = Class.new(TestBall) do invalid_sha256 = Class.new(TestBall) do
@sha256='dcbf5f44743b74add648c7e35e414076632fa3b24463d68d1f6afc5be77024f8' @sha256='dcbf5f44743b74add648c7e35e414076632fa3b24463d68d1f6afc5be77024f8'
end end
bad_checksum invalid_sha256 bad_checksum invalid_sha256
end end
end end

View File

@ -5,7 +5,7 @@ class AbstractDownloadStrategy
attr_reader :url attr_reader :url
end end
class MostlyAbstractFormula <Formula class MostlyAbstractFormula < Formula
@url='' @url=''
@homepage = 'http://example.com/' @homepage = 'http://example.com/'
end end
@ -20,7 +20,7 @@ class FormulaTests < Test::Unit::TestCase
end end
end end
end end
def test_class_naming def test_class_naming
assert_equal 'ShellFm', Formula.class_s('shell.fm') assert_equal 'ShellFm', Formula.class_s('shell.fm')
assert_equal 'Fooxx', Formula.class_s('foo++') assert_equal 'Fooxx', Formula.class_s('foo++')
@ -32,7 +32,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 eval <<-EOS
class TestBallOverrideBrew <Formula class TestBallOverrideBrew < Formula
def initialize def initialize
super "foo" super "foo"
end end
@ -42,7 +42,7 @@ class FormulaTests < Test::Unit::TestCase
EOS EOS
end end
end end
def test_abstract_formula def test_abstract_formula
f=MostlyAbstractFormula.new f=MostlyAbstractFormula.new
assert_equal '__UNKNOWN__', f.name assert_equal '__UNKNOWN__', f.name

View File

@ -4,10 +4,10 @@ require 'test/testball'
require 'keg' require 'keg'
class TestScriptFileFormula <ScriptFileFormula class TestScriptFileFormula < ScriptFileFormula
url "file:///#{Pathname.new(ABS__FILE__).realpath}" url "file:///#{Pathname.new(ABS__FILE__).realpath}"
version "1" version "1"
def initialize def initialize
@name='test-script-formula' @name='test-script-formula'
@homepage = 'http://example.com/' @homepage = 'http://example.com/'
@ -37,7 +37,7 @@ class InstallTests < Test::Unit::TestCase
# Allow the test to do some processing # Allow the test to do some processing
yield yield
# Remove the brewed formula and double check # Remove the brewed formula and double check
# that it did get removed. This lets multiple # that it did get removed. This lets multiple
# tests use the same formula name without # tests use the same formula name without
@ -51,13 +51,13 @@ class InstallTests < Test::Unit::TestCase
def test_a_basic_install def test_a_basic_install
f=TestBall.new f=TestBall.new
assert_equal Formula.path(f.name), f.path assert_equal Formula.path(f.name), f.path
assert !f.installed? assert !f.installed?
temporary_install f do temporary_install f do
assert_match Regexp.new("^#{HOMEBREW_CELLAR}/"), f.prefix.to_s assert_match Regexp.new("^#{HOMEBREW_CELLAR}/"), f.prefix.to_s
# Test that things made it into the Keg # Test that things made it into the Keg
assert f.bin.directory? assert f.bin.directory?
assert_equal 3, f.bin.children.length assert_equal 3, f.bin.children.length
@ -66,7 +66,7 @@ class InstallTests < Test::Unit::TestCase
assert_equal 1, libexec.children.length assert_equal 1, libexec.children.length
assert !(f.prefix+'main.c').exist? assert !(f.prefix+'main.c').exist?
assert f.installed? assert f.installed?
# Test that things make it into the Cellar # Test that things make it into the Cellar
keg=Keg.new f.prefix keg=Keg.new f.prefix
keg.link keg.link
@ -75,15 +75,15 @@ class InstallTests < Test::Unit::TestCase
assert_equal 3, (HOMEBREW_PREFIX+'bin').children.length assert_equal 3, (HOMEBREW_PREFIX+'bin').children.length
end end
end end
def test_script_install def test_script_install
f=TestScriptFileFormula.new f=TestScriptFileFormula.new
temporary_install f do temporary_install f do
nostdout do nostdout do
f.brew { f.install } f.brew { f.install }
end end
assert_equal 1, f.bin.children.length assert_equal 1, f.bin.children.length
end end
end end

View File

@ -7,7 +7,7 @@ class HardwareTests < Test::Unit::TestCase
def test_hardware_cpu_type def test_hardware_cpu_type
assert [:intel, :ppc].include?(Hardware.cpu_type) assert [:intel, :ppc].include?(Hardware.cpu_type)
end end
def test_hardware_intel_family def test_hardware_intel_family
if Hardware.cpu_type == :intel if Hardware.cpu_type == :intel
assert [:core, :core2, :penryn, :nehalem, :arrandale, :sandybridge].include?(Hardware.intel_family) assert [:core, :core2, :penryn, :nehalem, :arrandale, :sandybridge].include?(Hardware.intel_family)

View File

@ -17,7 +17,7 @@ class InreplaceTest < Test::Unit::TestCase
s1.change_make_var! "FLAG", "def" s1.change_make_var! "FLAG", "def"
assert_equal "OTHER=def\nFLAG=def\nFLAG2=abc", s1 assert_equal "OTHER=def\nFLAG=def\nFLAG2=abc", s1
end end
def test_change_make_var_empty_2 def test_change_make_var_empty_2
# Replace empty flag # Replace empty flag
s1="FLAG = \nmv file_a file_b" s1="FLAG = \nmv file_a file_b"
@ -25,7 +25,7 @@ class InreplaceTest < Test::Unit::TestCase
s1.change_make_var! "FLAG", "def" s1.change_make_var! "FLAG", "def"
assert_equal "FLAG=def\nmv file_a file_b", s1 assert_equal "FLAG=def\nmv file_a file_b", s1
end end
def test_change_make_var_append def test_change_make_var_append
# Append to flag # Append to flag
s1="OTHER=def\nFLAG = abc\nFLAG2=abc" s1="OTHER=def\nFLAG = abc\nFLAG2=abc"
@ -33,7 +33,7 @@ class InreplaceTest < Test::Unit::TestCase
s1.change_make_var! "FLAG", "\\1 def" s1.change_make_var! "FLAG", "\\1 def"
assert_equal "OTHER=def\nFLAG=abc def\nFLAG2=abc", s1 assert_equal "OTHER=def\nFLAG=abc def\nFLAG2=abc", s1
end end
def test_change_make_var_shell_style def test_change_make_var_shell_style
# Shell variables have no spaces around = # Shell variables have no spaces around =
s1="OTHER=def\nFLAG=abc\nFLAG2=abc" s1="OTHER=def\nFLAG=abc\nFLAG2=abc"

View File

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

View File

@ -24,10 +24,10 @@ class PatchingTests < Test::Unit::TestCase
def test_patchArray def test_patchArray
patches = Patches.new(["http://example.com/patch1.diff", "http://example.com/patch2.diff"]) patches = Patches.new(["http://example.com/patch1.diff", "http://example.com/patch2.diff"])
assert_equal 2, patches.patches.length assert_equal 2, patches.patches.length
p1 = patches.patches[0] p1 = patches.patches[0]
assert_equal :p1, p1.patch_p assert_equal :p1, p1.patch_p
p2 = patches.patches[0] p2 = patches.patches[0]
assert_equal :p1, p2.patch_p assert_equal :p1, p2.patch_p
end end
@ -37,7 +37,7 @@ class PatchingTests < Test::Unit::TestCase
:p0 => "http://example.com/patch.diff" :p0 => "http://example.com/patch.diff"
}) })
assert_equal 1, patches.patches.length assert_equal 1, patches.patches.length
p = patches.patches[0] p = patches.patches[0]
assert_equal :p0, p.patch_p assert_equal :p0, p.patch_p
end end
@ -47,7 +47,7 @@ class PatchingTests < Test::Unit::TestCase
:p1 => "http://example.com/patch.diff" :p1 => "http://example.com/patch.diff"
}) })
assert_equal 1, patches.patches.length assert_equal 1, patches.patches.length
p = patches.patches[0] p = patches.patches[0]
assert_equal :p1, p.patch_p assert_equal :p1, p.patch_p
end end

View File

@ -2,26 +2,26 @@ require 'testing_env'
require 'test/testball' require 'test/testball'
class DefaultPatchBall <TestBall class DefaultPatchBall < TestBall
def patches def patches
# Default is p1 # Default is p1
"file:///#{TEST_FOLDER}/patches/noop-a.diff" "file:///#{TEST_FOLDER}/patches/noop-a.diff"
end end
end end
class ListPatchBall <TestBall class ListPatchBall < TestBall
def patches def patches
["file:///#{TEST_FOLDER}/patches/noop-a.diff"] ["file:///#{TEST_FOLDER}/patches/noop-a.diff"]
end end
end end
class P0PatchBall <TestBall class P0PatchBall < TestBall
def patches def patches
{ :p0 => ["file:///#{TEST_FOLDER}/patches/noop-b.diff"] } { :p0 => ["file:///#{TEST_FOLDER}/patches/noop-b.diff"] }
end end
end end
class P1PatchBall <TestBall class P1PatchBall < TestBall
def patches def patches
{ :p1 => ["file:///#{TEST_FOLDER}/patches/noop-a.diff"] } { :p1 => ["file:///#{TEST_FOLDER}/patches/noop-a.diff"] }
end end
@ -32,7 +32,7 @@ class PatchingTests < Test::Unit::TestCase
def read_file path def read_file path
File.open(path, 'r') { |f| f.read } File.open(path, 'r') { |f| f.read }
end end
def test_single_patch def test_single_patch
shutup do shutup do
DefaultPatchBall.new('test_patch').brew do DefaultPatchBall.new('test_patch').brew do

View File

@ -7,7 +7,7 @@ class PathnameInstallTests < Test::Unit::TestCase
def setup def setup
FileUtils.mkdir_p TEMP_FOLDER FileUtils.mkdir_p TEMP_FOLDER
end end
def with_temp_folder def with_temp_folder
TEMP_FOLDER.cd do TEMP_FOLDER.cd do
# Keep these around while building out tests, to make sure # Keep these around while building out tests, to make sure
@ -19,47 +19,47 @@ class PathnameInstallTests < Test::Unit::TestCase
yield yield
end end
end end
def test_install_missing_file def test_install_missing_file
assert_raises(RuntimeError) do assert_raises(RuntimeError) do
Pathname.getwd.install 'non_existant_file' Pathname.getwd.install 'non_existant_file'
end end
end end
def test_install def test_install
with_temp_folder do with_temp_folder do
TARGET_FOLDER.install 'a.txt' TARGET_FOLDER.install 'a.txt'
assert (TARGET_FOLDER+'a.txt').exist?, "a.txt not installed." assert (TARGET_FOLDER+'a.txt').exist?, "a.txt not installed."
assert !(TARGET_FOLDER+'b.txt').exist?, "b.txt was installed." assert !(TARGET_FOLDER+'b.txt').exist?, "b.txt was installed."
end end
end end
def test_install_list def test_install_list
with_temp_folder do with_temp_folder do
TARGET_FOLDER.install %w[a.txt b.txt] TARGET_FOLDER.install %w[a.txt b.txt]
assert (TARGET_FOLDER+'a.txt').exist?, "a.txt not installed." assert (TARGET_FOLDER+'a.txt').exist?, "a.txt not installed."
assert (TARGET_FOLDER+'b.txt').exist?, "b.txt not installed." assert (TARGET_FOLDER+'b.txt').exist?, "b.txt not installed."
end end
end end
def test_install_glob def test_install_glob
with_temp_folder do with_temp_folder do
TARGET_FOLDER.install Dir['*.txt'] TARGET_FOLDER.install Dir['*.txt']
assert (TARGET_FOLDER+'a.txt').exist?, "a.txt not installed." assert (TARGET_FOLDER+'a.txt').exist?, "a.txt not installed."
assert (TARGET_FOLDER+'b.txt').exist?, "b.txt not installed." assert (TARGET_FOLDER+'b.txt').exist?, "b.txt not installed."
end end
end end
def test_install_folder def test_install_folder
with_temp_folder do with_temp_folder do
FileUtils.mkdir_p "bin" FileUtils.mkdir_p "bin"
system "mv *.txt bin" system "mv *.txt bin"
TARGET_FOLDER.install "bin" TARGET_FOLDER.install "bin"
assert (TARGET_FOLDER+'bin/a.txt').exist?, "a.txt not installed." assert (TARGET_FOLDER+'bin/a.txt').exist?, "a.txt not installed."
assert (TARGET_FOLDER+'bin/b.txt').exist?, "b.txt not installed." assert (TARGET_FOLDER+'bin/b.txt').exist?, "b.txt not installed."
end end
@ -68,40 +68,40 @@ class PathnameInstallTests < Test::Unit::TestCase
def test_install_rename def test_install_rename
with_temp_folder do with_temp_folder do
TARGET_FOLDER.install 'a.txt' => 'c.txt' TARGET_FOLDER.install 'a.txt' => 'c.txt'
assert (TARGET_FOLDER+'c.txt').exist?, "c.txt not installed." assert (TARGET_FOLDER+'c.txt').exist?, "c.txt not installed."
assert !(TARGET_FOLDER+'a.txt').exist?, "a.txt was installed but not renamed." assert !(TARGET_FOLDER+'a.txt').exist?, "a.txt was installed but not renamed."
assert !(TARGET_FOLDER+'b.txt').exist?, "b.txt was installed." assert !(TARGET_FOLDER+'b.txt').exist?, "b.txt was installed."
end end
end end
def test_install_rename_more def test_install_rename_more
with_temp_folder do with_temp_folder do
TARGET_FOLDER.install({'a.txt' => 'c.txt', 'b.txt' => 'd.txt'}) TARGET_FOLDER.install({'a.txt' => 'c.txt', 'b.txt' => 'd.txt'})
assert (TARGET_FOLDER+'c.txt').exist?, "c.txt not installed." assert (TARGET_FOLDER+'c.txt').exist?, "c.txt not installed."
assert (TARGET_FOLDER+'d.txt').exist?, "d.txt not installed." assert (TARGET_FOLDER+'d.txt').exist?, "d.txt not installed."
assert !(TARGET_FOLDER+'a.txt').exist?, "a.txt was installed but not renamed." assert !(TARGET_FOLDER+'a.txt').exist?, "a.txt was installed but not renamed."
assert !(TARGET_FOLDER+'b.txt').exist?, "b.txt was installed but not renamed." assert !(TARGET_FOLDER+'b.txt').exist?, "b.txt was installed but not renamed."
end end
end end
def test_install_rename_folder def test_install_rename_folder
with_temp_folder do with_temp_folder do
FileUtils.mkdir_p "bin" FileUtils.mkdir_p "bin"
system "mv *.txt bin" system "mv *.txt bin"
TARGET_FOLDER.install "bin" => "libexec" TARGET_FOLDER.install "bin" => "libexec"
assert !(TARGET_FOLDER+'bin').exist?, "bin was installed but not renamed." assert !(TARGET_FOLDER+'bin').exist?, "bin was installed but not renamed."
assert (TARGET_FOLDER+'libexec/a.txt').exist?, "a.txt not installed." assert (TARGET_FOLDER+'libexec/a.txt').exist?, "a.txt not installed."
assert (TARGET_FOLDER+'libexec/b.txt').exist?, "b.txt not installed." assert (TARGET_FOLDER+'libexec/b.txt').exist?, "b.txt not installed."
end end
end end
# test_install_symlink # test_install_symlink
# test_install_relative_symlink # test_install_relative_symlink
def teardown def teardown
FileUtils.rm_rf TEMP_FOLDER FileUtils.rm_rf TEMP_FOLDER
end end

View File

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

View File

@ -82,7 +82,7 @@ class UpdaterTests < Test::Unit::TestCase
assert report.select_formula(:R).empty? assert report.select_formula(:R).empty?
end end
end end
def test_update_homebrew_with_formulae_changes def test_update_homebrew_with_formulae_changes
diff_output = fixture('update_git_diff_output_with_formulae_changes') diff_output = fixture('update_git_diff_output_with_formulae_changes')

View File

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

View File

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