summaryrefslogtreecommitdiff
path: root/spec/functional/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'spec/functional/plugins')
-rw-r--r--spec/functional/plugins/powershell_spec.rb6
-rw-r--r--spec/functional/plugins/root_group_spec.rb2
-rw-r--r--spec/functional/plugins/windows/uptime_spec.rb12
3 files changed, 10 insertions, 10 deletions
diff --git a/spec/functional/plugins/powershell_spec.rb b/spec/functional/plugins/powershell_spec.rb
index 865bb850..affc2ed9 100644
--- a/spec/functional/plugins/powershell_spec.rb
+++ b/spec/functional/plugins/powershell_spec.rb
@@ -22,10 +22,10 @@ describe Ohai::System, "languages plugin" do
VERSION_MATCHING_REGEX = /^(?:[\d]+\.)+[\d]+$/
describe "powershell plugin", :windows_only do
RSpec.shared_examples "a version looking thing" do
- it "should be present" do
+ it "is present" do
expect(subject).not_to be_nil
end
- it "should look like a version" do
+ it "looks like a version" do
expect(subject).to match(VERSION_MATCHING_REGEX)
end
end
@@ -37,7 +37,7 @@ describe Ohai::System, "languages plugin" do
subject { @plugin[:languages][:powershell] }
- it "should have information about powershell" do
+ it "has information about powershell" do
expect(subject).not_to be_nil
end
diff --git a/spec/functional/plugins/root_group_spec.rb b/spec/functional/plugins/root_group_spec.rb
index 781582d8..2c7c8b8d 100644
--- a/spec/functional/plugins/root_group_spec.rb
+++ b/spec/functional/plugins/root_group_spec.rb
@@ -26,7 +26,7 @@ describe Ohai::System, "root_group plugin" do
describe "windows platform", :windows_only do
let (:wmi) { wmi = WmiLite::Wmi.new }
- it 'should return the system\'s administrators (root) group' do
+ it 'returns the system\'s administrators (root) group' do
# Notethat the Win32_Group WMI provider can be slow if your
# system is domain-joined and has hundreds of thousands of
# groups in Active Directory -- not a typical test scenario, but
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