Skip to content

Commit

Permalink
Run tests for both build environments
Browse files Browse the repository at this point in the history
  • Loading branch information
jacknagel committed Jun 18, 2015
1 parent 7edf004 commit 38974ed
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions Library/Homebrew/test/test_ENV.rb
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
require 'testing_env'
require 'extend/ENV'

class EnvironmentTests < Homebrew::TestCase
module SharedEnvTests
def setup
@env = {}.extend(EnvActivation)
@env.activate_extensions!
end

def test_switching_compilers
Expand Down Expand Up @@ -105,9 +104,7 @@ def test_prepend_path
@env.prepend_path 'FOO', '/bin'
assert_equal "/bin#{File::PATH_SEPARATOR}/usr/bin", @env['FOO']
end
end

module SharedEnvTests
def test_switching_compilers_updates_compiler
[:clang, :llvm, :gcc, :gcc_4_0].each do |compiler|
@env.send(compiler)
Expand All @@ -128,15 +125,17 @@ class StdenvTests < Homebrew::TestCase
include SharedEnvTests

def setup
@env = {}.extend(Stdenv)
super
@env.extend(Stdenv)
end
end

class SuperenvTests < Homebrew::TestCase
include SharedEnvTests

def setup
@env = {}.extend(Superenv)
super
@env.extend(Superenv)
end

def test_initializes_deps
Expand Down

0 comments on commit 38974ed

Please sign in to comment.