summaryrefslogtreecommitdiff
path: root/spec/unit/plugins/chef_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/unit/plugins/chef_spec.rb')
-rw-r--r--spec/unit/plugins/chef_spec.rb8
1 files changed, 3 insertions, 5 deletions
diff --git a/spec/unit/plugins/chef_spec.rb b/spec/unit/plugins/chef_spec.rb
index 1596e152..609597ee 100644
--- a/spec/unit/plugins/chef_spec.rb
+++ b/spec/unit/plugins/chef_spec.rb
@@ -23,13 +23,11 @@ begin
require "chef/version"
describe Ohai::System, "plugin chef" do
- before do
- @plugin = get_plugin("chef")
- end
+ let(:plugin) { get_plugin("chef") }
it "sets [:chef_packages][:chef][:version] to the current chef version", if: defined?(Chef) do
- @plugin.run
- expect(@plugin[:chef_packages][:chef][:version]).to eq(Chef::VERSION)
+ plugin.run
+ expect(plugin[:chef_packages][:chef][:version]).to eq(Chef::VERSION)
end
pending "would set [:chef_packages][:chef][:version] if chef was available", unless: defined?(Chef)