diff options
author | Paul Rossman <paul@factory9.com> | 2013-09-18 12:53:47 -0500 |
---|---|---|
committer | adamedx <adamed@opscode.com> | 2013-10-10 10:45:10 -0700 |
commit | 59060c1f03c8688f6b92df46c864f975adf7724f (patch) | |
tree | 2f132de4ab129f162b6b0d492f0929b8c72da4b0 | |
parent | b0a0fc5c4bb5ad6021267bad0b4b43ccf1d59224 (diff) | |
download | ohai-59060c1f03c8688f6b92df46c864f975adf7724f.tar.gz |
fix spec errors
-rw-r--r-- | spec/unit/plugins/gce_spec.rb | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/spec/unit/plugins/gce_spec.rb b/spec/unit/plugins/gce_spec.rb index 72699963..00a9a188 100644 --- a/spec/unit/plugins/gce_spec.rb +++ b/spec/unit/plugins/gce_spec.rb @@ -54,20 +54,6 @@ describe Ohai::System, "plugin gce" do end end - describe "with dmi and metadata address connected" do - it_should_behave_like "gce" - before(:each) do - File.should_receive(:read).with('/sys/firmware/dmi/entries/1-0/raw').and_return('Google') - end - end - - describe "without dmi and metadata address connected" do - it_should_behave_like "!gce" - before(:each) do - File.should_receive(:read).with('/sys/firmware/dmi/entries/1-0/raw').and_return('Test') - end - end - describe "with hint file" do it_should_behave_like "gce" @@ -92,6 +78,9 @@ describe Ohai::System, "plugin gce" do it_should_behave_like "!gce" before(:each) do + File.stub(:exist?).with('/etc/chef/ohai/hints/gce.json').and_return(false) + File.stub(:exist?).with('C:\chef\ohai\hints/gce.json').and_return(false) + File.stub!(:exist?).with('/etc/chef/ohai/hints/ec2.json').and_return(true) File.stub!(:read).with('/etc/chef/ohai/hints/ec2.json').and_return('') File.stub!(:exist?).with('C:\chef\ohai\hints/ec2.json').and_return(true) |