aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/test/test_compiler_selector.rb
diff options
context:
space:
mode:
authorMisty De Meo2013-05-20 19:35:07 -0500
committerMisty De Meo2013-05-20 23:25:15 -0500
commit7780e131820aab12ead852cd489e774ce764c247 (patch)
treef394e5d23cd27118bbaa2d65b10979b4b0b28f99 /Library/Homebrew/test/test_compiler_selector.rb
parent29590171230e4a60d0aa43480825de4b131753be (diff)
downloadhomebrew-7780e131820aab12ead852cd489e774ce764c247.tar.bz2
CompilerSelector: raise when no compatible compiler
This replaces the old behaviour of falling back to the original compiler with no messaging. Fixes #19170. Fixes mistydemeo/tigerbrew#45.
Diffstat (limited to 'Library/Homebrew/test/test_compiler_selector.rb')
-rw-r--r--Library/Homebrew/test/test_compiler_selector.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/Library/Homebrew/test/test_compiler_selector.rb b/Library/Homebrew/test/test_compiler_selector.rb
index 6e3a36366..4ce682c96 100644
--- a/Library/Homebrew/test/test_compiler_selector.rb
+++ b/Library/Homebrew/test/test_compiler_selector.rb
@@ -31,7 +31,7 @@ class CompilerSelectorTests < Test::Unit::TestCase
def test_all_compiler_failures
@f << :clang << :llvm << :gcc
- assert_equal @cc, actual_cc
+ assert_raise(CompilerSelectionError) { actual_cc }
end
def test_no_compiler_failures
@@ -77,13 +77,13 @@ class CompilerSelectorTests < Test::Unit::TestCase
def test_missing_gcc
MacOS.stubs(:gcc_build_version).returns(nil)
@f << :clang << :llvm
- assert_equal @cc, actual_cc
+ assert_raise(CompilerSelectionError) { actual_cc }
end
def test_missing_llvm_and_gcc
MacOS.stubs(:gcc_build_version).returns(nil)
MacOS.stubs(:llvm_build_version).returns(nil)
@f << :clang
- assert_equal @cc, actual_cc
+ assert_raise(CompilerSelectionError) { actual_cc }
end
end