summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2021-02-02 17:26:18 -0800
committerLamont Granquist <lamont@scriptkiddie.org>2021-02-02 17:26:18 -0800
commit04a9d1ac660c15a0930b02bed38b72cfa9952014 (patch)
treed9bccf917d9dd140e89f6be21e7526fcbb096a50
parent3b3e25cd6f4a607c11cc7b545ff18cad7844ea32 (diff)
downloadohai-lcg/success-cannot-be-true.tar.gz
Remove stubbing mock methods onto the frozen `true` valuelcg/success-cannot-be-true
Ideally we should track down the actual class of the object being returned here and `instance_double()` it properly (but there's a thousand other specs that need it more than this does) Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
-rw-r--r--spec/unit/plugins/hostname_spec.rb2
-rw-r--r--spec/unit/plugins/windows/filesystem_spec.rb4
2 files changed, 3 insertions, 3 deletions
diff --git a/spec/unit/plugins/hostname_spec.rb b/spec/unit/plugins/hostname_spec.rb
index 6da5a9d5..9819c42f 100644
--- a/spec/unit/plugins/hostname_spec.rb
+++ b/spec/unit/plugins/hostname_spec.rb
@@ -95,7 +95,7 @@ describe Ohai::System, "hostname plugin" do
end
describe Ohai::System, "hostname plugin for windows", :windows_only do
- let(:success) { true }
+ let(:success) { double }
let(:host) do
{
diff --git a/spec/unit/plugins/windows/filesystem_spec.rb b/spec/unit/plugins/windows/filesystem_spec.rb
index 396eb300..82095953 100644
--- a/spec/unit/plugins/windows/filesystem_spec.rb
+++ b/spec/unit/plugins/windows/filesystem_spec.rb
@@ -1,6 +1,6 @@
#
# Author:: Nimesh Pathi <nimesh.patni@msystechnologies.com>
-# Copyright:: Copyright (c) 2018 Chef Software, Inc.
+# Copyright:: Copyright (c) Chef Software Inc.
# License:: Apache License, Version 2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -22,7 +22,7 @@ require "wmi-lite/wmi" unless defined?(WmiLite::Wmi)
describe Ohai::System, "Windows Filesystem Plugin", :windows_only do
let(:plugin) { get_plugin("filesystem") }
- let(:success) { true }
+ let(:success) { double }
let(:logical_disks_instances) do
[