summaryrefslogtreecommitdiff
path: root/spec/unit/plugins/linux/uptime_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/unit/plugins/linux/uptime_spec.rb')
-rw-r--r--spec/unit/plugins/linux/uptime_spec.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/spec/unit/plugins/linux/uptime_spec.rb b/spec/unit/plugins/linux/uptime_spec.rb
index 4bdc46de..c95e9a3d 100644
--- a/spec/unit/plugins/linux/uptime_spec.rb
+++ b/spec/unit/plugins/linux/uptime_spec.rb
@@ -19,29 +19,29 @@
require File.expand_path(File.dirname(__FILE__) + "/../../../spec_helper.rb")
describe Ohai::System, "Linux plugin uptime" do
- before(:each) do
+ before do
@plugin = get_plugin("uptime")
allow(@plugin).to receive(:collect_os).and_return(:linux)
@double_file = double("/proc/uptime", { :gets => "18423 989" })
allow(File).to receive(:open).with("/proc/uptime").and_return(@double_file)
end
- it "should set uptime_seconds to uptime" do
+ it "sets uptime_seconds to uptime" do
@plugin.run
expect(@plugin[:uptime_seconds]).to eq(18423)
end
- it "should set uptime to a human readable date" do
+ it "sets uptime to a human readable date" do
@plugin.run
expect(@plugin[:uptime]).to eq("5 hours 07 minutes 03 seconds")
end
- it "should set idletime_seconds to uptime" do
+ it "sets idletime_seconds to uptime" do
@plugin.run
expect(@plugin[:idletime_seconds]).to eq(989)
end
- it "should set idletime to a human readable date" do
+ it "sets idletime to a human readable date" do
@plugin.run
expect(@plugin[:idletime]).to eq("16 minutes 29 seconds")
end