File: task_spec.rb

package info (click to toggle)
ruby-vmstat 2.3.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 344 kB
  • sloc: ruby: 1,136; ansic: 347; makefile: 3
file content (27 lines) | stat: -rw-r--r-- 754 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
require 'spec_helper'

describe Vmstat::Task do
  context "Vmstat#task" do
    let(:task) { Vmstat.task }
    subject { task }

    it "should be a vmstat task object" do
      should be_a(described_class)
    end

    context "methods" do
      it { should respond_to(:virtual_size) }
      it { should respond_to(:resident_size) }
      it { should respond_to(:user_time_ms) }
      it { should respond_to(:system_time_ms) }
    end
    
    context "content" do
      its(:virtual_size) { should be_a_kind_of(Numeric) }
      its(:resident_size) { should be_a_kind_of(Numeric) }
      its(:user_time_ms) { should be_a_kind_of(Numeric) }
      its(:system_time_ms) { should be_a_kind_of(Numeric) }
    end
  end
end if RUBY_PLATFORM =~ /darwin|linux/