diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2015-12-11 15:33:39 -0800 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2015-12-14 12:51:58 -0800 |
commit | 4ce69808f22a1b401f510075744e0a571831dd1e (patch) | |
tree | 9d6d71a792f04cc89a001a302398c4ac324775cd /spec/support/shared/unit | |
parent | 6c041d73236a8c5f21ef62cf0bb6118bf348a902 (diff) | |
download | chef-4ce69808f22a1b401f510075744e0a571831dd1e.tar.gz |
mocking the filesystem is dumb
Diffstat (limited to 'spec/support/shared/unit')
-rw-r--r-- | spec/support/shared/unit/provider/file.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/spec/support/shared/unit/provider/file.rb b/spec/support/shared/unit/provider/file.rb index 60f45c2472..c05157e45c 100644 --- a/spec/support/shared/unit/provider/file.rb +++ b/spec/support/shared/unit/provider/file.rb @@ -473,6 +473,7 @@ shared_examples_for Chef::Provider::File do end it "raises an exception if any verification fails" do + allow(Fille).to receive(:directory?).with("C:\\Windows\\system32/cmd.exe").and_return(false) provider.new_resource.verify windows? ? "REM" : "true" provider.new_resource.verify windows? ? "cmd.exe /c exit 1" : "false" expect{provider.send(:do_validate_content)}.to raise_error(Chef::Exceptions::ValidationFailed) |