Sha256: 7b8b52a5bff0c2b60287afe2a52a26e865bd07574d96f55954c7a1f222122be3
Contents?: true
Size: 790 Bytes
Versions: 16
Compression:
Stored size: 790 Bytes
Contents
require 'dply/yum' module Dply describe Yum do describe ".install" do it "installs the missing packages" do expect(Yum).to receive(:cmd).with(["yum", "install", "-y", "xyz"]) expect { Yum.install(["glibc", "xyz"]) }.to raise_error(Error) end it "doesn't do anything if packages are already installed" do expect(Yum).not_to receive(:cmd).with(array_including("yum", "install")) Yum.install(["glibc", "bash"]) end end describe ".installed?" do it "returns true if all pkgs are installed" do expect(Yum.installed? ["glibc", "bash"]).to eq(true) end it "returns false if some pkgs are not installed" do expect(Yum.installed? ["glibc", "xyz"]).to eq(false) end end end end
Version data entries
16 entries across 16 versions & 1 rubygems