diff options
Diffstat (limited to 'Library/Homebrew/test/testball.rb')
| -rw-r--r-- | Library/Homebrew/test/testball.rb | 54 |
1 files changed, 18 insertions, 36 deletions
diff --git a/Library/Homebrew/test/testball.rb b/Library/Homebrew/test/testball.rb index 2bc93731f..13f54f3df 100644 --- a/Library/Homebrew/test/testball.rb +++ b/Library/Homebrew/test/testball.rb @@ -1,10 +1,13 @@ require 'formula' class TestBall < Formula - def initialize name=nil + def initialize(*) @homepage = 'http://example.com/' - @stable ||= SoftwareSpec.new - @stable.url "file:///#{TEST_FOLDER}/tarballs/testball-0.1.tbz" + self.class.instance_eval do + @stable ||= SoftwareSpec.new + @stable.url "file:///#{TEST_FOLDER}/tarballs/testball-0.1.tbz" + @stable.sha1 "482e737739d946b7c8cbaf127d9ee9c148b999f5" + end super "testball" end def install @@ -13,18 +16,11 @@ class TestBall < Formula end end -class TestBallWithRealPath < TestBall - def initialize name=nil - super "testballwithrealpath" - @path = Pathname.new(__FILE__) - end -end - class TestBallWithMirror < Formula url "file:///#{TEST_FOLDER}/bad_url/testball-0.1.tbz" mirror "file:///#{TEST_FOLDER}/tarballs/testball-0.1.tbz" - def initialize name=nil + def initialize(*) super "testballwithmirror" end end @@ -34,7 +30,7 @@ class ConfigureFails < Formula version '1.0.0' sha1 'b36c65e5de86efef1b3a7e9cf78a98c186b400b3' - def initialize name=nil + def initialize(*) super "configurefails" end @@ -64,7 +60,7 @@ class SpecTestBall < Formula sha1 '8badf00d8badf00d8badf00d8badf00d8badf00d' => :mountain_lion end - def initialize name=nil + def initialize(*) super "spectestball" end end @@ -88,7 +84,7 @@ class ExplicitVersionSpecTestBall < Formula sha1 '8badf00d8badf00d8badf00d8badf00d8badf00d' => :mountain_lion end - def initialize name=nil + def initialize(*) super "explicitversionspectestball" end end @@ -97,7 +93,7 @@ class HeadOnlySpecTestBall < Formula homepage 'http://example.com' head 'https://github.com/mxcl/homebrew.git' - def initialize name=nil + def initialize(*) super "headyonlyspectestball" end end @@ -107,7 +103,7 @@ class IncompleteStableSpecTestBall < Formula head 'https://github.com/mxcl/homebrew.git' sha1 '482e737739d946b7c8cbaf127d9ee9c148b999f5' - def initialize name=nil + def initialize(*) super "incompletestablespectestball" end end @@ -117,7 +113,7 @@ class HeadOnlyWithVersionSpecTestBall < Formula head 'https://github.com/mxcl/homebrew.git' version '0.3' - def initialize name=nil + def initialize(*) super "headonlywithversionspectestball" end end @@ -131,7 +127,7 @@ class ExplicitStrategySpecTestBall < Formula url 'file:///foo.com/testball-devel', :using => :bzr, :tag => '0.3' end - def initialize name=nil + def initialize(*) super "explicitstrategyspectestball" end end @@ -146,7 +142,7 @@ class SnowLeopardBottleSpecTestBall < Formula sha1 'deadbeefdeadbeefdeadbeefdeadbeefdeadbeef' => :snow_leopard end - def initialize name=nil + def initialize(*) super "snowleopardbottlespectestball" end end @@ -161,7 +157,7 @@ class LionBottleSpecTestBall < Formula sha1 'deadbeefdeadbeefdeadbeefdeadbeefdeadbeef' => :lion end - def initialize name=nil + def initialize(*) super "lionbottlespectestball" end end @@ -180,7 +176,7 @@ class AllCatsBottleSpecTestBall < Formula sha1 '8badf00d8badf00d8badf00d8badf00d8badf00d' => :mountain_lion end - def initialize name=nil + def initialize(*) super "allcatsbottlespectestball" end end @@ -198,21 +194,7 @@ class RevisedBottleSpecTestBall < Formula sha1 '8badf00d8badf00d8badf00d8badf00d8badf00d' => :mountain_lion end - def initialize name=nil + def initialize(*) super "revisedbottlespectestball" end end - -class CustomVersionScheme < Version -end - -class CustomVersionSchemeTestBall < Formula - homepage 'http://example.com' - url 'file:///foo.com/testball-0.1.tbz' - sha1 '482e737739d946b7c8cbaf127d9ee9c148b999f5' - version '1.0' => CustomVersionScheme - - def initialize name=nil - super "customversionschemetestball" - end -end |
