diff options
| author | Jack Nagel | 2013-09-20 22:54:07 -0500 |
|---|---|---|
| committer | Jack Nagel | 2013-09-20 22:54:07 -0500 |
| commit | 65fc34cd0380322291c84d06a126a0b75fa63496 (patch) | |
| tree | f0c96189d96c290602b56366a6ad8708b62f0016 /Library/Homebrew | |
| parent | 5b7b8fb5da08f838b024d17ec6f3ce8b5ef8adb4 (diff) | |
| download | brew-65fc34cd0380322291c84d06a126a0b75fa63496.tar.bz2 | |
Add tests to ensure ENV.compiler is correct
Diffstat (limited to 'Library/Homebrew')
| -rw-r--r-- | Library/Homebrew/test/test_ENV.rb | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/Library/Homebrew/test/test_ENV.rb b/Library/Homebrew/test/test_ENV.rb index 96d2c7cf4..92b185949 100644 --- a/Library/Homebrew/test/test_ENV.rb +++ b/Library/Homebrew/test/test_ENV.rb @@ -117,3 +117,28 @@ class EnvironmentTests < Test::Unit::TestCase assert_equal "/bin#{File::PATH_SEPARATOR}/usr/bin", @env['FOO'] end end + +module SharedEnvTests + def test_switching_compilers_updates_compiler + [:clang, :llvm, :gcc].each do |compiler| + @env.send(compiler) + assert_equal compiler, @env.compiler + end + end +end + +class StdenvTests < Test::Unit::TestCase + include SharedEnvTests + + def setup + @env = {}.extend(Stdenv) + end +end + +class SuperenvTests < Test::Unit::TestCase + include SharedEnvTests + + def setup + @env = {}.extend(Superenv) + end +end |
