aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2014-06-13 16:32:26 -0500
committerJack Nagel2014-06-13 16:32:26 -0500
commitbe6328b3ee097bf2eb5fb67918419e2a2179e06f (patch)
treee8741099f9c13821b867862b5edb6dc0b625b663 /Library
parent3642fb760629e39904215f80486d4c5924572086 (diff)
downloadhomebrew-be6328b3ee097bf2eb5fb67918419e2a2179e06f.tar.bz2
Only define intel family test on intel CPU
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/test/test_hardware.rb10
1 files changed, 3 insertions, 7 deletions
diff --git a/Library/Homebrew/test/test_hardware.rb b/Library/Homebrew/test/test_hardware.rb
index 06c009e76..ff086b1e9 100644
--- a/Library/Homebrew/test/test_hardware.rb
+++ b/Library/Homebrew/test/test_hardware.rb
@@ -2,16 +2,12 @@ require 'testing_env'
require 'hardware'
class HardwareTests < Test::Unit::TestCase
- # these will raise if we don't recognise your mac, but that prolly
- # indicates something went wrong rather than we don't know
def test_hardware_cpu_type
assert [:intel, :ppc].include?(Hardware::CPU.type)
end
def test_hardware_intel_family
- if Hardware::CPU.type == :intel
- assert [:core, :core2, :penryn, :nehalem,
- :arrandale, :sandybridge, :ivybridge, :haswell].include?(Hardware::CPU.family)
- end
- end
+ families = [:core, :core2, :penryn, :nehalem, :arrandale, :sandybridge, :ivybridge, :haswell]
+ assert families.include?(Hardware::CPU.family)
+ end if Hardware::CPU.intel?
end