Sha256: 19f149dabd58c62abcfdefa30cdc0d7823236fb8c7be6fe993f0f2b9bcd5e76e
Contents?: true
Size: 823 Bytes
Versions: 10
Compression:
Stored size: 823 Bytes
Contents
########################################################### # test_sys_cpu_linux.rb # # Test Suite for sys-cpu for Linux. This should be run via # the 'rake test' task. ########################################################### require 'rubygems' gem 'test-unit' require 'sys/cpu' require 'test/unit' require 'test_sys_cpu_version' include Sys class TC_Sys_CPU_Linux < Test::Unit::TestCase def test_all_dynamic_methods assert_nothing_raised{ CPU.processors{ |cs| cs.members.each{ |m| cs[m].to_s } } } end def test_load_avg assert_nothing_raised{ CPU.load_avg } assert_equal(3, CPU.load_avg.length) end def test_cpu_stats assert_nothing_raised{ CPU.cpu_stats } assert_kind_of(Hash, CPU.cpu_stats) assert_equal(true, CPU.cpu_stats['cpu0'].length >= 4) end end
Version data entries
10 entries across 10 versions & 1 rubygems