aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/test
diff options
context:
space:
mode:
authorJack Nagel2015-04-15 21:28:23 -0400
committerJack Nagel2015-04-15 21:28:23 -0400
commitc1f5100fd8528fdd7c17750b6cad1f6b59f4fb68 (patch)
tree765a8d383462b220b1cd548f1b9e45383dc4b908 /Library/Homebrew/test
parentf5b18c72b33af7d8e609838ba2c4eeb06acf596f (diff)
downloadhomebrew-c1f5100fd8528fdd7c17750b6cad1f6b59f4fb68.tar.bz2
Fix test formula name so it matches the filename
Diffstat (limited to 'Library/Homebrew/test')
-rw-r--r--Library/Homebrew/test/test_cmd_cleanup.rb6
-rw-r--r--Library/Homebrew/test/test_formula.rb20
-rw-r--r--Library/Homebrew/test/test_formula_install.rb2
-rw-r--r--Library/Homebrew/test/testball.rb4
4 files changed, 15 insertions, 17 deletions
diff --git a/Library/Homebrew/test/test_cmd_cleanup.rb b/Library/Homebrew/test/test_cmd_cleanup.rb
index 0c3ccb75f..ebbff129e 100644
--- a/Library/Homebrew/test/test_cmd_cleanup.rb
+++ b/Library/Homebrew/test/test_cmd_cleanup.rb
@@ -4,9 +4,9 @@ require 'cmd/cleanup'
class CleanupTests < Homebrew::TestCase
def test_cleanup
- f1 = Class.new(TestBall) { version '0.1' }.new
- f2 = Class.new(TestBall) { version '0.2' }.new
- f3 = Class.new(TestBall) { version '0.3' }.new
+ f1 = Class.new(Testball) { version "0.1" }.new
+ f2 = Class.new(Testball) { version "0.2" }.new
+ f3 = Class.new(Testball) { version "0.3" }.new
shutup do
f1.brew { f1.install }
diff --git a/Library/Homebrew/test/test_formula.rb b/Library/Homebrew/test/test_formula.rb
index 730c1e63b..da8734e2d 100644
--- a/Library/Homebrew/test/test_formula.rb
+++ b/Library/Homebrew/test/test_formula.rb
@@ -15,18 +15,18 @@ class FormulaTests < Homebrew::TestCase
end
def test_prefix
- f = TestBall.new
+ f = Testball.new
assert_equal HOMEBREW_CELLAR/f.name/'0.1', f.prefix
assert_kind_of Pathname, f.prefix
end
def test_revised_prefix
- f = Class.new(TestBall) { revision 1 }.new
+ f = Class.new(Testball) { revision 1 }.new
assert_equal HOMEBREW_CELLAR/f.name/'0.1_1', f.prefix
end
def test_installed?
- f = TestBall.new
+ f = Testball.new
f.stubs(:installed_prefix).returns(stub(:directory? => false))
refute_predicate f, :installed?
@@ -42,7 +42,7 @@ class FormulaTests < Homebrew::TestCase
end
def test_installed_prefix
- f = TestBall.new
+ f = Testball.new
assert_equal f.prefix, f.installed_prefix
end
@@ -116,27 +116,27 @@ class FormulaTests < Homebrew::TestCase
end
def test_equality
- x = TestBall.new
- y = TestBall.new
+ x = Testball.new
+ y = Testball.new
assert_equal x, y
assert_eql x, y
assert_equal x.hash, y.hash
end
def test_inequality
- x = TestBall.new("foo")
- y = TestBall.new("bar")
+ x = Testball.new("foo")
+ y = Testball.new("bar")
refute_equal x, y
refute_eql x, y
refute_equal x.hash, y.hash
end
def test_comparison_with_non_formula_objects_does_not_raise
- refute_equal TestBall.new, Object.new
+ refute_equal Testball.new, Object.new
end
def test_sort_operator
- assert_nil TestBall.new <=> Object.new
+ assert_nil Testball.new <=> Object.new
end
def test_class_naming
diff --git a/Library/Homebrew/test/test_formula_install.rb b/Library/Homebrew/test/test_formula_install.rb
index c9357e8ce..0d7b4609e 100644
--- a/Library/Homebrew/test/test_formula_install.rb
+++ b/Library/Homebrew/test/test_formula_install.rb
@@ -27,7 +27,7 @@ class InstallTests < Homebrew::TestCase
end
def test_a_basic_install
- f = TestBall.new
+ f = Testball.new
refute_predicate f, :installed?
diff --git a/Library/Homebrew/test/testball.rb b/Library/Homebrew/test/testball.rb
index 4bb8df773..0b8b3465a 100644
--- a/Library/Homebrew/test/testball.rb
+++ b/Library/Homebrew/test/testball.rb
@@ -1,6 +1,4 @@
-require 'formula'
-
-class TestBall < Formula
+class Testball < Formula
def initialize(name="test_ball", path=Pathname.new(__FILE__).expand_path, spec=:stable)
self.class.instance_eval do
stable.url "file://#{TEST_DIRECTORY}/tarballs/testball-0.1.tbz"