diff options
author | Anton Kvashenkin <ak@gfoil.ru> | 2018-09-12 22:55:52 +0300 |
---|---|---|
committer | Anton Kvashenkin <ak@gfoil.ru> | 2018-09-12 22:55:52 +0300 |
commit | ab638662a903c239c2e42842f3a0950877653fef (patch) | |
tree | bab440e327b58945d50d192ae6e2e92aec2f5896 | |
parent | 0b2ab45c555ec74acf6d63a725d37e475f17e6d8 (diff) | |
download | ohai-ab638662a903c239c2e42842f3a0950877653fef.tar.gz |
Fix rspec unit test for root_group plugin
Signed-off-by: Anton Kvashenkin <anton.jugatsu@gmail.com>
-rw-r--r-- | spec/unit/plugins/root_group_spec.rb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/spec/unit/plugins/root_group_spec.rb b/spec/unit/plugins/root_group_spec.rb index 705acd77..4ac2a2b0 100644 --- a/spec/unit/plugins/root_group_spec.rb +++ b/spec/unit/plugins/root_group_spec.rb @@ -77,11 +77,14 @@ describe Ohai::System, "root_group" do end describe "windows platform" do + + let(:wmi) { double("wmi", { query: "" }) } + before(:each) do allow(WmiLite::Wmi).to receive(:new).and_return(wmi) - allow(plugin).to receive(:collect_os).and_return(:windows) + allow(@plugin).to receive(:collect_os).and_return(:windows) end - it "should return the group administrators" do + it "should return the group Administrators" do expect(wmi) .to receive(:query) .with("select * from Win32_Group where sid like 'S-1-5-32-544' and LocalAccount=True") |