Sha256: d549952a99fdc43c9e1f66b1b5bce6d16fdfb5e9072d52a0ef146e87a5fe4af2

Contents?: true

Size: 512 Bytes

Versions: 1

Compression:

Stored size: 512 Bytes

Contents

require 'spec_helper'
describe ServState::NetworkUsage do
  let(:net) { described_class.new }

  it 'should has at least lo interface in statistic' do
    expect(net.speeds['lo']).to_not be_nil
  end
  
  it 'should has right array on each interface' do
    net.speeds.each do |k, val|
      expect(val).to be_a Array
      expect(val.size).to eq(2)
    end
  end

  it 'should contain array of not negative numbers' do
    net.speeds.each do |k, val|
      val.each { |x| expect(x).to be >=0 }
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ServState-0.1.3 spec/unit/network_usage_spec.rb