blob: a1f94f6b3337173d4d8c3534dc3dd615b6a3826f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
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].include?(Hardware.intel_family)
end
end
end
|