From 75db51a20e5dbf4dfe0e83b8e861a5acdc508cc8 Mon Sep 17 00:00:00 2001 From: Tim Smith Date: Wed, 10 Oct 2018 11:54:09 -0700 Subject: Rename the load_plugin method to load_plugin_for_tests This exists just for rspec. We should probably just monkey patch this in via rspec. It's :( to have a method that's just for test execution. Signed-off-by: Tim Smith --- lib/ohai/loader.rb | 2 +- spec/spec_helper.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ohai/loader.rb b/lib/ohai/loader.rb index 17d969ef..1f1b351b 100644 --- a/lib/ohai/loader.rb +++ b/lib/ohai/loader.rb @@ -85,7 +85,7 @@ module Ohai # purposes. # # @param plugin_path [String] - def load_plugin(plugin_path) + def load_plugin_for_tests(plugin_path) plugin_class = load_plugin_class_from_file(plugin_path) return nil unless plugin_class.kind_of?(Class) if plugin_class < Ohai::DSL::Plugin::VersionVII diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 94bdffc6..1c791ca0 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -28,7 +28,7 @@ end def get_plugin(plugin, ohai = Ohai::System.new, path = PLUGIN_PATH) loader = Ohai::Loader.new(ohai) - loader.load_plugin(File.join(path, "#{plugin}.rb")) + loader.load_plugin_for_tests(File.join(path, "#{plugin}.rb")) end def convert_windows_output(stdout) -- cgit v1.2.1