I have just started to use ChefSpec and am just investigating exactly what it allows
I have a chef recipe that installs Sublime and adds sublime to the path variable on windows:
chocolatey_package 'sublimetext3' do
action :upgrade
end
windows_path node['sublime']['installation_path'] do
action :add
only_if { node['platform_family'] == 'windows' }
end
Is it possible to test such a thing?
For example, something like:
it 'adds sublime to the machines path variable' do
expect(chef_run).to set_windows_path('pathtocheck')
end
I can't seem to find any documentation on this, or exactly what ChefSpec allows you to check for.
Thank you