Sha256: 71be0f56caa25bc10efd76806871e908c0a4cbb2ce8394e9a443fc25ce177cc0

Contents?: true

Size: 932 Bytes

Versions: 75

Compression:

Stored size: 932 Bytes

Contents

# encoding: utf-8
# copyright: 2016, Chef Software, Inc.
# license: All rights reserved

title 'Gordon Config Checks'

# To pass the test, create the following file
# ```bash
# mkdir -p /tmp/gordon
# cat <<EOF > /tmp/gordon/config.yaml
# version: '1.0'
# EOF
# ```
control 'gordon-1.0' do
  impact 0.7
  title 'Verify the version number of Gordon'
  desc 'An optional description...'
  tag 'gordon'
  ref 'Gordon Requirements 1.0', uri: 'http://...'

  # Test using the custom gordon_config Inspec resource
  # Find the resource content here: ../libraries/
  describe gordon_config do
    it { should exist }
    its('version') { should eq('1.0') }
    its('file_size') { should <= 20 }
    its('comma_count') { should eq 0 }
  end

  # Test the version again to showcase variables
  g = gordon_config
  g_path = g.file_path
  g_version = g.version
  describe file(g_path) do
    its('content') { should match g_version }
  end
end

Version data entries

75 entries across 75 versions & 1 rubygems

Version Path
inspec-1.29.0 examples/profile/controls/gordon.rb
inspec-1.28.1 examples/profile/controls/gordon.rb
inspec-1.28.0 examples/profile/controls/gordon.rb
inspec-1.27.0 examples/profile/controls/gordon.rb
inspec-1.26.0 examples/profile/controls/gordon.rb
inspec-1.25.1 examples/profile/controls/gordon.rb
inspec-1.25.0 examples/profile/controls/gordon.rb
inspec-1.24.0 examples/profile/controls/gordon.rb
inspec-1.23.0 examples/profile/controls/gordon.rb
inspec-1.22.0 examples/profile/controls/gordon.rb
inspec-1.21.0 examples/profile/controls/gordon.rb
inspec-1.20.0 examples/profile/controls/gordon.rb
inspec-1.19.2 examples/profile/controls/gordon.rb
inspec-1.19.1 examples/profile/controls/gordon.rb
inspec-1.19.0 examples/profile/controls/gordon.rb
inspec-1.18.0 examples/profile/controls/gordon.rb
inspec-1.17.0 examples/profile/controls/gordon.rb
inspec-1.16.1 examples/profile/controls/gordon.rb
inspec-1.16.0 examples/profile/controls/gordon.rb
inspec-1.15.0 examples/profile/controls/gordon.rb