aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew
diff options
context:
space:
mode:
authorJack Nagel2014-08-30 23:25:46 -0500
committerJack Nagel2014-08-30 23:25:46 -0500
commit2e2c348944bace8e7c84168f5de0485e0119c792 (patch)
tree02c12f3a6ad7f8e98ce2e265f633507e145649d4 /Library/Homebrew
parent842b051aa77ec35fc03601c0abc6c17dfaf4de51 (diff)
downloadbrew-2e2c348944bace8e7c84168f5de0485e0119c792.tar.bz2
Test fails_with against spec objects
Diffstat (limited to 'Library/Homebrew')
-rw-r--r--Library/Homebrew/test/test_fails_with.rb18
1 files changed, 9 insertions, 9 deletions
diff --git a/Library/Homebrew/test/test_fails_with.rb b/Library/Homebrew/test/test_fails_with.rb
index ee25bcf4a..460c0dbd7 100644
--- a/Library/Homebrew/test/test_fails_with.rb
+++ b/Library/Homebrew/test/test_fails_with.rb
@@ -1,17 +1,17 @@
require 'testing_env'
-require 'test/testball'
+require 'software_spec'
class FailsWithTests < Homebrew::TestCase
def assert_fails_with(cc)
- assert @f.new.fails_with?(cc)
+ assert @spec.fails_with?(cc)
end
- def assert_does_not_fail_with(cc)
- assert !@f.new.fails_with?(cc)
+ def refute_fails_with(cc)
+ refute @spec.fails_with?(cc)
end
def fails_with(*args, &block)
- @f.fails_with(*args, &block)
+ @spec.fails_with(*args, &block)
end
def build_cc(name, version)
@@ -19,7 +19,7 @@ class FailsWithTests < Homebrew::TestCase
end
def setup
- @f = Class.new(TestBall)
+ @spec = SoftwareSpec.new
end
def test_fails_with_symbol
@@ -31,7 +31,7 @@ class FailsWithTests < Homebrew::TestCase
def test_fails_with_build
fails_with(:clang) { build 211 }
cc = build_cc(:clang, 318)
- assert_does_not_fail_with cc
+ refute_fails_with cc
end
def test_fails_with_block_without_build
@@ -54,13 +54,13 @@ class FailsWithTests < Homebrew::TestCase
clang = build_cc(:clang, 425)
assert_fails_with llvm
assert_fails_with clang
- assert_does_not_fail_with gcc
+ refute_fails_with gcc
end
def test_fails_with_version
fails_with(:gcc => '4.8') { version '4.8.1' }
assert_fails_with build_cc("gcc-4.8", "4.8")
assert_fails_with build_cc("gcc-4.8", "4.8.1")
- assert_does_not_fail_with build_cc("gcc-4.8", "4.8.2")
+ refute_fails_with build_cc("gcc-4.8", "4.8.2")
end
end