Sha256: 0616a5a7b082356edfb596a5c4817328886789446c64ab88c1361961697a4519
Contents?: true
Size: 1.7 KB
Versions: 2
Compression:
Stored size: 1.7 KB
Contents
require 'rspec' require 'spec_helper' describe 'IncludeLibrary' do it 'should include the library' do a = Usagewatch a.should be Usagewatch end end describe 'DiskUsage' do it "should be the GB of disk used" do a = Usagewatch.uw_diskused a.class.should be(Float) a.should_not be_nil a.should be >= 0 end end describe 'CPUUsage' do it "should be the percentage of cpu used" do a = Usagewatch.uw_cpuused a.class.should be(Float) a.should_not be_nil a.should be <= 100 a.should be >= 0 end end describe 'PercentageDiskUsage' do it "should be the percentage of GB of disk used" do a = Usagewatch.uw_diskused_perc a.class.should be(Float) a.should_not be_nil a.should be <= 100 a.should be >= 0 end end describe 'LoadAverage' do it "should be the average load of the past minute" do a = Usagewatch.uw_load a.class.should be(Float) a.should_not be_nil a.should be >= 0 end end describe 'TopCPUUsage' do it "should be an array of top cpu consumption proccesses " do a = Usagewatch.uw_cputop a.class.should be(Array ) a.should_not be_nil a[0][0].class.should be String a[0][1].class.should be String a.count.should be == 10 end end describe 'TopMEMUsage' do it "should be an array of top mem consumption proccesses " do a = Usagewatch.uw_cputop a.class.should be(Array ) a.should_not be_nil a[0][0].class.should be String a[0][1].class.should be String a.count.should be == 10 end end describe 'HTTPConns' do it 'should be the number of current apache connections' do a = Usagewatch.uw_httpconns a.class.should be Fixnum a.should_not be_nil a.should be >= 0 end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
usagewatch_ext-0.1.0 | spec/general_spec.rb |
usagewatch_ext-0.0.4.pre1 | spec/general_spec.rb |