diff options
Diffstat (limited to 'spec/functional/plugins/windows/uptime_spec.rb')
-rw-r--r-- | spec/functional/plugins/windows/uptime_spec.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/spec/functional/plugins/windows/uptime_spec.rb b/spec/functional/plugins/windows/uptime_spec.rb index d1abd681..3f093363 100644 --- a/spec/functional/plugins/windows/uptime_spec.rb +++ b/spec/functional/plugins/windows/uptime_spec.rb @@ -33,18 +33,18 @@ describe Ohai::System, "Windows plugin uptime" do }) end - before(:each) do + before do allow(uptime_plugin).to receive(:collect_os).and_return(:windows) allow(WmiLite::Wmi).to receive(:new).and_return(wmi) allow(Time).to receive_message_chain(:new, :to_i).and_return(1473756619) end - it "should set uptime_seconds to uptime" do + it "sets uptime_seconds to uptime" do uptime_plugin.run expect(uptime_plugin[:uptime_seconds]).to be == 80331 end - it "should set uptime to a human readable value" do + it "sets uptime to a human readable value" do uptime_plugin.run expect(uptime_plugin[:uptime]).to eq("22 hours 18 minutes 51 seconds") end @@ -63,17 +63,17 @@ describe Ohai::System, "Windows plugin uptime" do }) end - before(:each) do + before do allow(uptime_plugin).to receive(:collect_os).and_return(:windows) allow(WmiLite::Wmi).to receive(:new).and_return(wmi) end - it "should set uptime_seconds to uptime" do + it "sets uptime_seconds to uptime" do uptime_plugin.run expect(uptime_plugin[:uptime_seconds]).to be == 785345 end - it "should set uptime to a human readable value" do + it "sets uptime to a human readable value" do uptime_plugin.run expect(uptime_plugin[:uptime]).to eq("9 days 02 hours 09 minutes 05 seconds") end |