| 
									
										
										
										
											2010-02-18 12:00:07 -08:00
										 |  |  | 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 | 
					
						
							| 
									
										
										
										
											2013-03-17 13:30:12 -05:00
										 |  |  |     assert [:intel, :ppc].include?(Hardware::CPU.type) | 
					
						
							| 
									
										
										
										
											2010-02-18 12:00:07 -08:00
										 |  |  |   end | 
					
						
							| 
									
										
										
										
											2012-06-20 00:51:01 -05:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-02-18 12:00:07 -08:00
										 |  |  |   def test_hardware_intel_family | 
					
						
							| 
									
										
										
										
											2013-06-13 12:04:58 -05:00
										 |  |  |     if Hardware::CPU.type == :intel | 
					
						
							| 
									
										
										
										
											2013-02-28 21:57:14 +01:00
										 |  |  |       assert [:core, :core2, :penryn, :nehalem, | 
					
						
							| 
									
										
										
										
											2013-07-01 01:06:44 -05:00
										 |  |  |         :arrandale, :sandybridge, :ivybridge, :haswell].include?(Hardware::CPU.family) | 
					
						
							| 
									
										
										
										
											2010-02-18 12:00:07 -08:00
										 |  |  |     end | 
					
						
							|  |  |  |   end | 
					
						
							| 
									
										
										
										
											2012-04-18 15:43:42 -05:00
										 |  |  | end |