summaryrefslogtreecommitdiff
path: root/spec/unit/plugins/openbsd/hostname_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/unit/plugins/openbsd/hostname_spec.rb')
-rw-r--r--spec/unit/plugins/openbsd/hostname_spec.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/unit/plugins/openbsd/hostname_spec.rb b/spec/unit/plugins/openbsd/hostname_spec.rb
index 670e743d..e8e5e2ec 100644
--- a/spec/unit/plugins/openbsd/hostname_spec.rb
+++ b/spec/unit/plugins/openbsd/hostname_spec.rb
@@ -21,9 +21,9 @@ require File.expand_path(File.dirname(__FILE__) + '/../../../spec_helper.rb')
describe Ohai::System, "OpenBSD hostname plugin" do
before(:each) do
- @ohai = Ohai::System.new
- Ohai::Loader.new(@ohai).load_plugin(File.join(PLUGIN_PATH, "openbsd/hostname.rb"), "ohost")
- @plugin = @ohai.plugins[:ohost][:plugin].new(@ohai)
+ ohai = Ohai::System.new
+ loader = Ohai::Loader.new(ohai)
+ @plugin = loader.load_plugin(File.join(PLUGIN_PATH, "openbsd/hostname.rb")).new(ohai)
@plugin[:os] = "openbsd"
@plugin.stub(:from).with("hostname -s").and_return("katie")
@plugin.stub(:from).with("hostname").and_return("katie.bethell")