Sha256: 9bb4896ad6697a86285bc75fc3e27014c347ca34975842788586e28656b00c6e
Contents?: true
Size: 793 Bytes
Versions: 1
Compression:
Stored size: 793 Bytes
Contents
require 'spec_helper' describe LinuxAdmin::Yum do context ".updates_available?" do it "updates are available" do LinuxAdmin::Common.stub(:run => 100) expect(described_class.updates_available?).to be_true end it "updates not available" do LinuxAdmin::Common.stub(:run => 0) expect(described_class.updates_available?).to be_false end it "other exit code" do LinuxAdmin::Common.stub(:run => 255) expect { described_class.updates_available? }.to raise_error end it "other error" do LinuxAdmin::Common.stub(:run).and_raise(RuntimeError) expect { described_class.updates_available? }.to raise_error end end it ".update" do LinuxAdmin::Common.should_receive(:run).once described_class.update end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
linux_admin-0.0.1 | spec/yum_spec.rb |