summaryrefslogtreecommitdiff
path: root/spec/functional/plugins/powershell_spec.rb
diff options
context:
space:
mode:
authorTim Smith <tsmith84@gmail.com>2019-08-16 13:15:22 -0700
committerTim Smith <tsmith84@gmail.com>2019-08-16 13:15:22 -0700
commit54b3cc831750805f19f838d60dea25e23dfa2e8c (patch)
tree81f539fca05ca2d0ed0761011913cd852b46d450 /spec/functional/plugins/powershell_spec.rb
parent038fd847c6d75dfaf6e60b67de185732aa245cc3 (diff)
downloadohai-rspec.tar.gz
rspec updates from rubocop-rspecrspec
Autocorrects for a few different things that rubocop-rspec identified. Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'spec/functional/plugins/powershell_spec.rb')
-rw-r--r--spec/functional/plugins/powershell_spec.rb16
1 files changed, 11 insertions, 5 deletions
diff --git a/spec/functional/plugins/powershell_spec.rb b/spec/functional/plugins/powershell_spec.rb
index a4fa4d4b..c7058078 100644
--- a/spec/functional/plugins/powershell_spec.rb
+++ b/spec/functional/plugins/powershell_spec.rb
@@ -22,52 +22,58 @@ describe Ohai::System, "languages plugin" do
VERSION_MATCHING_REGEX = /^(?:[\d]+\.)+[\d]+$/.freeze
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
+ subject { @plugin[:languages][:powershell] }
+
before(:all) do
@plugin = get_plugin("powershell")
@plugin[:languages] = Mash.new
@plugin.run
end
- subject { @plugin[:languages][:powershell] }
-
- it "should have information about powershell" do
+ it "has information about powershell" do
expect(subject).not_to be_nil
end
describe :version do
subject { @plugin.languages[:powershell][described_class] }
+
it_behaves_like "a version looking thing"
end
describe :ws_man_stack_version do
subject { @plugin.languages[:powershell][described_class] }
+
it_behaves_like "a version looking thing"
end
describe :serialization_version do
subject { @plugin.languages[:powershell][described_class] }
+
it_behaves_like "a version looking thing"
end
describe :clr_version do
subject { @plugin.languages[:powershell][described_class] }
+
it_behaves_like "a version looking thing"
end
describe :build_version do
subject { @plugin.languages[:powershell][described_class] }
+
it_behaves_like "a version looking thing"
end
describe :remoting_protocol_version do
subject { @plugin.languages[:powershell][described_class] }
+
it_behaves_like "a version looking thing"
end