File: kmod_spec.rb

package info (click to toggle)
puppet-module-camptocamp-kmod 2.1.1-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, sid, trixie
  • size: 288 kB
  • sloc: ruby: 244; makefile: 12; sh: 11
file content (26 lines) | stat: -rw-r--r-- 771 bytes parent folder | download | duplicates (3)
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
require 'spec_helper'

describe 'kmod', :type => :class do

  on_supported_os.each do |os, facts|
    context "on #{os} with augeas 0.8.9" do
      let(:facts) do facts.merge({:augeasversion => '0.8.9'}) end
      it do
        expect {
          should compile
        }.to raise_error(/Augeas 0.10.0 or higher required/)
      end
    end
    context "on #{os}" do
      let(:facts) do
        facts.merge(  { :augeasversion => '1.2.0' } )
      end

      it { should contain_class('kmod') }
      it { should contain_file('/etc/modprobe.d').with({ 'ensure' => 'directory' }) }
      ['modprobe.conf','aliases.conf','blacklist.conf'].each do |file|
        it { should contain_file("/etc/modprobe.d/#{file}").with({ 'ensure' => 'file' }) }
      end
    end
  end
end