summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/chef/resource/timezone.rb2
-rw-r--r--spec/unit/resource/timezone_spec.rb4
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/chef/resource/timezone.rb b/lib/chef/resource/timezone.rb
index 97aa738af9..7ed67860cd 100644
--- a/lib/chef/resource/timezone.rb
+++ b/lib/chef/resource/timezone.rb
@@ -74,7 +74,7 @@ class Chef
# @since 14.7
# @return [String] timezone id
def current_windows_tz
- tz_shellout = shell_out!("tzutil /g")
+ tz_shellout = shell_out("tzutil /g")
raise "There was an error running the tzutil command" if tz_shellout.exitstatus == 1
tz_shellout.stdout.strip
diff --git a/spec/unit/resource/timezone_spec.rb b/spec/unit/resource/timezone_spec.rb
index 8ba033f072..b48a69e103 100644
--- a/spec/unit/resource/timezone_spec.rb
+++ b/spec/unit/resource/timezone_spec.rb
@@ -21,7 +21,7 @@ describe Chef::Resource::Timezone do
let(:resource) { Chef::Resource::Timezone.new("fakey_fakerton") }
let(:shellout_tzutil) do
- double("shell_out!", stdout: "UTC\n", exitstatus: 0, error?: false)
+ double("shell_out", stdout: "UTC\n", exitstatus: 0, error?: false)
end
# note: This weird indention is correct
@@ -87,7 +87,7 @@ systemd-timesyncd.service active: yes
describe "#current_windows_tz?" do
it "returns the TZ" do
- expect(resource).to receive(:shell_out!).and_return(shellout_tzutil)
+ expect(resource).to receive(:shell_out).and_return(shellout_tzutil)
expect(resource.current_windows_tz).to eql("UTC")
end
end