diff options
author | aliasgar16 <aliasgar.batterywala@clogeny.com> | 2016-09-13 21:15:56 +0530 |
---|---|---|
committer | aliasgar16 <aliasgar.batterywala@clogeny.com> | 2016-09-13 21:15:56 +0530 |
commit | 2dc33369cab377e176535a10e80f1b869f3a1a31 (patch) | |
tree | afb32042a2ce7d46e6ccebcd4e2dcb5824565c47 | |
parent | e3deffa297d138737c08e01e43beba9440862caf (diff) | |
download | ohai-2dc33369cab377e176535a10e80f1b869f3a1a31.tar.gz |
Fixed travis issue and changed shared_context names in RSpecs.
-rw-r--r-- | spec/functional/plugins/windows/uptime_spec.rb | 6 | ||||
-rw-r--r-- | spec/unit/plugins/windows/uptime_spec.rb | 10 |
2 files changed, 8 insertions, 8 deletions
diff --git a/spec/functional/plugins/windows/uptime_spec.rb b/spec/functional/plugins/windows/uptime_spec.rb index 9b8eb83b..d1abd681 100644 --- a/spec/functional/plugins/windows/uptime_spec.rb +++ b/spec/functional/plugins/windows/uptime_spec.rb @@ -29,7 +29,7 @@ describe Ohai::System, "Windows plugin uptime" do let(:wmi) do double("wmi", { :first_of => - { "lastbootuptime" => "20160912103128.597219+330" }, + { "lastbootuptime" => "20160912103128.597219+0000" }, }) end @@ -41,12 +41,12 @@ describe Ohai::System, "Windows plugin uptime" do it "should set uptime_seconds to uptime" do uptime_plugin.run - expect(uptime_plugin[:uptime_seconds]).to be == 100131 + expect(uptime_plugin[:uptime_seconds]).to be == 80331 end it "should set uptime to a human readable value" do uptime_plugin.run - expect(uptime_plugin[:uptime]).to eq("1 day 03 hours 48 minutes 51 seconds") + expect(uptime_plugin[:uptime]).to eq("22 hours 18 minutes 51 seconds") end end diff --git a/spec/unit/plugins/windows/uptime_spec.rb b/spec/unit/plugins/windows/uptime_spec.rb index f65de16d..05d2fd2f 100644 --- a/spec/unit/plugins/windows/uptime_spec.rb +++ b/spec/unit/plugins/windows/uptime_spec.rb @@ -27,7 +27,7 @@ describe Ohai::System, "Windows plugin uptime" do end ## Windows newer versions category here includes server OS starting from Windows Server 2008 ## - shared_context "WMI class to use to fetch system uptime for newer versions of Windows platform" do + shared_context "WMI class for newer versions of Windows platform" do before do allow(uptime_plugin).to receive(:collect_os).and_return(:windows) end @@ -42,7 +42,7 @@ describe Ohai::System, "Windows plugin uptime" do end ## Windows older versions category here includes server OS starting from Windows Server 2003 ## - shared_context "WMI class to use to fetch system uptime for older versions of Windows platform" do + shared_context "WMI class for older versions of Windows platform" do before do allow(uptime_plugin).to receive(:collect_os).and_return(:windows) end @@ -63,7 +63,7 @@ describe Ohai::System, "Windows plugin uptime" do end end - include_context "WMI class to use to fetch system uptime for newer versions of Windows platform" + include_context "WMI class for newer versions of Windows platform" end context "platform is Windows Server 2003 R2" do @@ -73,7 +73,7 @@ describe Ohai::System, "Windows plugin uptime" do end end - include_context "WMI class to use to fetch system uptime for older versions of Windows platform" + include_context "WMI class for older versions of Windows platform" end context "platform is Windows Server 2012" do @@ -83,6 +83,6 @@ describe Ohai::System, "Windows plugin uptime" do end end - include_context "WMI class to use to fetch system uptime for newer versions of Windows platform" + include_context "WMI class for newer versions of Windows platform" end end |