summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2017-10-23 17:04:48 -0700
committerTim Smith <tsmith@chef.io>2017-10-24 09:18:41 -0700
commit12a82f5da7adf03fd2d98979c843a085ace2a72f (patch)
tree4fad4a7112199e0b2a2fafd5b35e35443e8adbd8
parent208b3535112daad99201ab2d66df31772d6d76aa (diff)
downloadohai-rackspace_windows.tar.gz
Add a VERY basic windows specrackspace_windows
All we have is the main rackspace attribute and since we're checking ruby versions in the method we can't really mock out the wmi stuff. Signed-off-by: Tim Smith <tsmith@chef.io>
-rw-r--r--spec/unit/plugins/rackspace_spec.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/unit/plugins/rackspace_spec.rb b/spec/unit/plugins/rackspace_spec.rb
index 68e1a532..3e4ff23b 100644
--- a/spec/unit/plugins/rackspace_spec.rb
+++ b/spec/unit/plugins/rackspace_spec.rb
@@ -223,6 +223,18 @@ OUT
end
end
+ describe "with Rackspace windows manufacturer data" do
+ it "has rackspace attribute" do
+ plugin.run
+ expect(plugin[:rackspace]).not_to be_nil
+ end
+
+ before(:each) do
+ allow(plugin).to receive(:hint?).with("rackspace").and_return(false)
+ allow(plugin).to receive(:has_rackspace_manufacturer?).and_return(true)
+ end
+ end
+
describe "xenstore provider returns rackspace" do
it_behaves_like "rackspace"