aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/test/test_hardware.rb
blob: 6b05bde30ea2a236ba022e9bf7de252a8f324af1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
require 'testing_env'
require 'hardware'

class HardwareTests < Homebrew::TestCase
  def test_hardware_cpu_type
    assert [:intel, :ppc].include?(Hardware::CPU.type)
  end

  def test_hardware_intel_family
    families = [:core, :core2, :penryn, :nehalem, :arrandale, :sandybridge, :ivybridge, :haswell]
    assert families.include?(Hardware::CPU.family)
  end if Hardware::CPU.intel?
end