Sha256: 9887b2c7ec89d5b60733462e84ff6142b9b88569c6e8e7cf4183e219d3662150
Contents?: true
Size: 908 Bytes
Versions: 3
Compression:
Stored size: 908 Bytes
Contents
require 'minitest_helper' describe Datacenter::Process do let(:pid) { 22803 } let(:process) { Datacenter::Process.new pid, mock_shell } it ('Pid') { process.pid.must_equal pid } it ('Alive') { process.must_be :alive? } it ('Dead') { Datacenter::Process.new(-pid, mock_shell).wont_be :alive? } it ('Stop') { process.stop } it ('Kill') { Datacenter::Process.new(pid, Datacenter::Shell::Kill.new(pid)).kill } it ('Name') { process.name.must_equal 'gnome-system-mo' } it ('Command') { process.command.must_equal 'gnome-system-monitor' } it ('Memory') { process.memory.must_equal 33.0 } it ('Virtual Memory') { process.virtual_memory.must_equal 501.23828125 } it ('% Memory') { process.mem_usage.must_equal 0.8 } it ('% CPU') { process.cpu_usage.must_equal 11.9 } it ('Status') { process.status.must_equal 'Sl' } it ('User') { process.user.must_equal 'matias' } end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
datacenter-0.1.2 | spec/process_spec.rb |
datacenter-0.1.1 | spec/process_spec.rb |
datacenter-0.1.0 | spec/process_spec.rb |