summaryrefslogtreecommitdiff
path: root/spec/functional/dsl
diff options
context:
space:
mode:
Diffstat (limited to 'spec/functional/dsl')
-rw-r--r--spec/functional/dsl/reboot_pending_spec.rb9
-rw-r--r--spec/functional/dsl/registry_helper_spec.rb4
2 files changed, 3 insertions, 10 deletions
diff --git a/spec/functional/dsl/reboot_pending_spec.rb b/spec/functional/dsl/reboot_pending_spec.rb
index 966f8b58c5..e92b83504f 100644
--- a/spec/functional/dsl/reboot_pending_spec.rb
+++ b/spec/functional/dsl/reboot_pending_spec.rb
@@ -22,17 +22,12 @@ require "spec_helper"
describe Chef::DSL::RebootPending, :windows_only do
def run_ohai
- ohai = Ohai::System.new
- # Would be nice to limit this to platform/kernel/arch etc for Ohai 7
- ohai.all_plugins
- node.consume_external_attrs(ohai.data,{})
-
- ohai
+ node.consume_external_attrs(OHAI_SYSTEM.data,{})
end
let(:node) { Chef::Node.new }
- let(:events) { Chef::EventDispatch::Dispatcher.new }
let!(:ohai) { run_ohai } # Ensure we have necessary node data
+ let(:events) { Chef::EventDispatch::Dispatcher.new }
let(:run_context) { Chef::RunContext.new(node, {}, events) }
let(:recipe) { Chef::Recipe.new("a windows cookbook", "the windows recipe", run_context) }
let(:registry) { Chef::Win32::Registry.new(run_context) }
diff --git a/spec/functional/dsl/registry_helper_spec.rb b/spec/functional/dsl/registry_helper_spec.rb
index 20efade913..1337f16a1e 100644
--- a/spec/functional/dsl/registry_helper_spec.rb
+++ b/spec/functional/dsl/registry_helper_spec.rb
@@ -31,9 +31,7 @@ describe Chef::Resource::RegistryKey, :windows_only do
events = Chef::EventDispatch::Dispatcher.new
node = Chef::Node.new
- ohai = Ohai::System.new
- ohai.all_plugins
- node.consume_external_attrs(ohai.data,{})
+ node.consume_external_attrs(OHAI_SYSTEM.data,{})
run_context = Chef::RunContext.new(node, {}, events)
@resource = Chef::Resource.new("foo", run_context)
end