diff options
| author | Mike McQuaid | 2016-04-25 17:53:43 +0100 |
|---|---|---|
| committer | Mike McQuaid | 2016-05-08 16:51:22 +0100 |
| commit | ddb576b582ddc801ac702566bacbc2f231fc86af (patch) | |
| tree | 797a86d0cdd540a5f0b8ad3995abe43aea17f2b9 /Library/Homebrew/os | |
| parent | c5520d0050e3a5a9050314daf643b298a5432d67 (diff) | |
| download | brew-ddb576b582ddc801ac702566bacbc2f231fc86af.tar.bz2 | |
Add support for testing generic OS.
If the environment variable HOMEBREW_TEST_GENERIC_OS is set ensure that
neither Mac nor Linux-specific code is loaded. This allows easier
testing of cross-platform code on OS X and will make it easier to port
Homebrew to platforms other than OS X and Linux.
Diffstat (limited to 'Library/Homebrew/os')
| -rw-r--r-- | Library/Homebrew/os/mac.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Library/Homebrew/os/mac.rb b/Library/Homebrew/os/mac.rb index 73e499d40..98053f4ba 100644 --- a/Library/Homebrew/os/mac.rb +++ b/Library/Homebrew/os/mac.rb @@ -12,6 +12,8 @@ module OS ::MacOS = self # compatibility + raise "Loaded OS::Mac on generic OS!" if ENV["HOMEBREW_TEST_GENERIC_OS"] + # This can be compared to numerics, strings, or symbols # using the standard Ruby Comparable methods. def version |
