File: fstab_spec.rb

package info (click to toggle)
ruby-serverspec 2.42.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 980 kB
  • sloc: ruby: 4,835; makefile: 4
file content (31 lines) | stat: -rw-r--r-- 682 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
require 'spec_helper'

set :os, :family => 'linux'

describe fstab do
  let(:stdout) { "/dev/sda1 /mnt ext4 ro,errors=remount-ro,barrier=0 0 2\r\n" }
  it { should have_entry( :mount_point => '/mnt' ) }
end

describe fstab do
  let(:exit_status) { 1 }
  it { should_not have_entry( :mount_point => '/mnt' ) }
end

describe fstab do
  let(:stdout) { "/dev/sda1 /mnt ext4 ro,errors=remount-ro,barrier=0 0 2\r\n" }
  it do
    should have_entry(
      :device => '/dev/sda1',
      :mount_point => '/mnt',
      :type => 'ext4',
      :options => {
        :ro => true,
        :errors => 'remount-ro',
        :barrier => 0
      },
      :dump => 0,
      :pass => 2
    )
  end
end