inspec/test/unit/resources/grub_conf_test.rb

30 lines
713 B
Ruby
Raw Normal View History

2015-12-22 03:38:49 +00:00
# encoding: utf-8
# author: Thomas Cate
require 'helper'
require 'inspec/resource'
describe 'Inspec::Resources::GrubConfig' do
it 'verify kernel include' do
2016-01-12 22:41:52 +00:00
resource = MockLoader.new(:centos6).load_resource('grub_conf')
2015-12-22 03:38:49 +00:00
_(resource.kernel).must_be_kind_of Array
end
it 'verify initrd include' do
2016-01-12 22:41:52 +00:00
resource = MockLoader.new(:centos6).load_resource('grub_conf')
_(resource.initrd).must_be_kind_of String
2015-12-22 03:38:49 +00:00
end
it 'verify default' do
2016-01-12 22:41:52 +00:00
resource = MockLoader.new(:centos6).load_resource('grub_conf')
2015-12-22 03:38:49 +00:00
_(resource.default).must_equal '0'
end
it 'verify timeout' do
2016-01-12 22:41:52 +00:00
resource = MockLoader.new(:centos6).load_resource('grub_conf')
2015-12-22 03:38:49 +00:00
_(resource.timeout).must_equal '5'
end
end