summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsersut <serdar@opscode.com>2014-01-14 14:45:03 -0800
committersersut <serdar@opscode.com>2014-03-07 12:26:01 -0800
commitbc609179d155b179d9bb24e7460b6e9c6575e6be (patch)
tree621314e1bb7773be2f0fc277a996fcdaed790ebf
parent59793ac7ad45e8149b33c5b26d76ed2d8164de67 (diff)
downloadchef-bc609179d155b179d9bb24e7460b6e9c6575e6be.tar.gz
Fix chef spec infra to use OHAI correctly.
-rw-r--r--spec/functional/resource/base.rb4
-rw-r--r--spec/functional/resource/deploy_revision_spec.rb2
-rw-r--r--spec/functional/resource/git_spec.rb2
-rw-r--r--spec/spec_helper.rb3
-rw-r--r--spec/support/shared/functional/windows_script.rb3
5 files changed, 5 insertions, 9 deletions
diff --git a/spec/functional/resource/base.rb b/spec/functional/resource/base.rb
index 13438c1759..48a53fe4aa 100644
--- a/spec/functional/resource/base.rb
+++ b/spec/functional/resource/base.rb
@@ -22,9 +22,7 @@ def ohai
# provider is platform-dependent, we need platform ohai data:
@OHAI_SYSTEM ||= begin
ohai = Ohai::System.new
- ohai.require_plugin("os")
- ohai.require_plugin("platform")
- ohai.require_plugin("passwd")
+ ohai.all_plugins(["os", "platform"])
ohai
end
end
diff --git a/spec/functional/resource/deploy_revision_spec.rb b/spec/functional/resource/deploy_revision_spec.rb
index 425d7acf9c..9ff1391e35 100644
--- a/spec/functional/resource/deploy_revision_spec.rb
+++ b/spec/functional/resource/deploy_revision_spec.rb
@@ -45,7 +45,7 @@ describe Chef::Resource::DeployRevision, :unix_only => true do
before(:all) do
@ohai = Ohai::System.new
- @ohai.require_plugin("os")
+ @ohai.all_plugins("os")
end
let(:node) do
diff --git a/spec/functional/resource/git_spec.rb b/spec/functional/resource/git_spec.rb
index 7ade6eea21..f0bd94b0c0 100644
--- a/spec/functional/resource/git_spec.rb
+++ b/spec/functional/resource/git_spec.rb
@@ -92,7 +92,7 @@ E
before(:all) do
@ohai = Ohai::System.new
- @ohai.require_plugin("os")
+ @ohai.all_plugins("os")
end
context "working with pathes with special characters" do
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index 5098a1fb85..c7ebb11d3f 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -87,8 +87,7 @@ Dir["spec/support/**/*.rb"].
each { |f| require f }
OHAI_SYSTEM = Ohai::System.new
-OHAI_SYSTEM.require_plugin("os")
-OHAI_SYSTEM.require_plugin("platform")
+OHAI_SYSTEM.all_plugins(["os", "platform"])
TEST_PLATFORM = OHAI_SYSTEM["platform"].dup.freeze
TEST_PLATFORM_VERSION = OHAI_SYSTEM["platform_version"].dup.freeze
diff --git a/spec/support/shared/functional/windows_script.rb b/spec/support/shared/functional/windows_script.rb
index afeb4c029c..4e7361cf60 100644
--- a/spec/support/shared/functional/windows_script.rb
+++ b/spec/support/shared/functional/windows_script.rb
@@ -23,8 +23,7 @@ shared_context Chef::Resource::WindowsScript do
before(:all) do
ohai_reader = Ohai::System.new
- ohai_reader.require_plugin("os")
- ohai_reader.require_plugin("windows::platform")
+ ohai_reader.all_plugins(["os", "platform"])
new_node = Chef::Node.new
new_node.consume_external_attrs(ohai_reader.data,{})