diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2014-01-29 16:08:47 -0800 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2014-01-29 16:09:55 -0800 |
commit | 882a0a9e262c8579e5d0e3b5fa79f0208c52d0f5 (patch) | |
tree | 290e1c6090bf87bd5d443c246ae49c7dc80d73b8 /spec/support | |
parent | 900886337d3b5dc1a4f4514aff91ba234d327bfe (diff) | |
download | chef-882a0a9e262c8579e5d0e3b5fa79f0208c52d0f5.tar.gz |
fix broken file provider specs
fixing the should_not raise_error(Whatever) specs exposed that these
were broken.
Diffstat (limited to 'spec/support')
-rw-r--r-- | spec/support/shared/unit/provider/file.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/support/shared/unit/provider/file.rb b/spec/support/shared/unit/provider/file.rb index b37f0ae888..c3d678816a 100644 --- a/spec/support/shared/unit/provider/file.rb +++ b/spec/support/shared/unit/provider/file.rb @@ -108,6 +108,16 @@ end shared_examples_for Chef::Provider::File do + let!(:tempfile) do + Tempfile.new("rspec-shared-file-provider") + end + + before(:each) do + content.stub(:tempfile).and_return(tempfile) + File.stub(:exist?).with(tempfile.path).and_call_original + File.stub(:exists?).with(tempfile.path).and_call_original + end + it "should return a #{described_class}" do provider.should be_a_kind_of(described_class) end |