Sha256: b4ca5224f81018a2a0ae712ee3d6ad172f445c9b1e6d446f1fe3d92838896b56

Contents?: true

Size: 548 Bytes

Versions: 3

Compression:

Stored size: 548 Bytes

Contents

require 'spec_helper'

describe LinuxAdmin::System do
  describe "#reboot!" do
    it "reboots the system" do
      LinuxAdmin::System.should_receive(:run).
         with(LinuxAdmin::System.cmd(:shutdown),
              :params => { '-r' => 'now'})
      LinuxAdmin::System.reboot!
    end
  end

  describe "#shutdown!" do
    it "shuts down the system" do
      LinuxAdmin::System.should_receive(:run).
         with(LinuxAdmin::System.cmd(:shutdown),
              :params => { '-h' => '0'})
      LinuxAdmin::System.shutdown!
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
linux_admin-0.1.3 spec/system_spec.rb
linux_admin-0.1.2 spec/system_spec.rb
linux_admin-0.1.1 spec/system_spec.rb