Sha256: 85f365ba171efa2c05088baf600be647f21600d8ee7ef50e396dc20b2c1aa7d3
Contents?: true
Size: 734 Bytes
Versions: 16
Compression:
Stored size: 734 Bytes
Contents
describe LinuxAdmin::Partition do before(:each) do @disk = LinuxAdmin::Disk.new :path => '/dev/sda' @partition = LinuxAdmin::Partition.new :disk => @disk, :id => 2 end describe "#path" do it "returns partition path" do expect(@partition.path).to eq('/dev/sda2') end end describe "#mount" do context "mount_point not specified" do it "sets default mount_point" do expect(described_class).to receive(:mount_point_exists?).and_return(false) expect(File).to receive(:directory?).with('/mnt/sda2').and_return(true) expect(LinuxAdmin::Common).to receive(:run!) @partition.mount expect(@partition.mount_point).to eq('/mnt/sda2') end end end end
Version data entries
16 entries across 16 versions & 1 rubygems