Skip to content

Instantly share code, notes, and snippets.

@stonith
Last active August 29, 2015 14:03
Show Gist options
  • Save stonith/b033dca348635bb4f522 to your computer and use it in GitHub Desktop.
Save stonith/b033dca348635bb4f522 to your computer and use it in GitHub Desktop.
Example Serverspec Tests
require 'spec_helper'
describe 'windows box' do
it 'should have a vagrant user' do
expect(user 'vagrant').to exist
end
end
describe windows_feature('Web-Webserver') do
it{ should be_installed.by("powershell") }
end
describe service('Windows Update') do
it { should be_installed }
it { should_not be_enabled }
it { should_not be_running }
it { should have_start_mode("Disabled") }
end
describe package('VCI-StatsdCollector') do
it { should be_installed}
end
describe package('VCI-Utils') do
it { should be_installed}
end
describe package('nxlog-ce') do
it { should be_installed}
end
describe windows_hot_fix('KB2957189') do
it { should be_installed}
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment