Sha256: 1e828deab2c1c3df1b50da1610b39561486cc613b2528af4d345462502b88511
Contents?: true
Size: 741 Bytes
Versions: 14
Compression:
Stored size: 741 Bytes
Contents
require 'spec_helper' RSpec.configure do |c| c.os = 'Plamo' end describe interface('eth0') do let(:stdout) { '1000' } its(:speed) { should eq 1000 } its(:command) { should eq "ethtool eth0 | grep Speed | gawk '{print gensub(/Speed: ([0-9]+)Mb\\/s/,\"\\\\1\",\"\")}'" } end describe interface('eth0') do it { should have_ipv4_address("192.168.10.10") } its(:command) { should eq "ip addr show eth0 | grep 'inet 192\\.168\\.10\\.10/'" } end describe interface('eth0') do it { should have_ipv4_address("192.168.10.10/24") } its(:command) { should eq "ip addr show eth0 | grep 'inet 192\\.168\\.10\\.10/24 '" } end describe interface('invalid-interface') do let(:stdout) { '1000' } its(:speed) { should_not eq 100 } end
Version data entries
14 entries across 14 versions & 1 rubygems