I'm building an acceptance test for puppet on windows where I need to make sure certain security policies where indeed changed after the manifest is applied. I have
it 'should modify security policy' do
system("secedit.exe /export /areas SECURITYPOLICY /cfg C:\policy.txt")
File.read('C:\policy.txt').should include "Banner Title"
end
When I run this I get a no such file or directory in reference to the file I'm creating, this leads me to believe the initial command pulling the policies into a file isn't being run.
Is there something I'm doing wrong?