summaryrefslogtreecommitdiff
path: root/spec/unit/runner_spec.rb
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2017-03-17 12:33:28 -0700
committerLamont Granquist <lamont@scriptkiddie.org>2017-03-17 12:35:58 -0700
commitddb93d1d20205565fd7092e2fdeca3efddb00698 (patch)
tree36d5ed77cb294ed204d3711b920c1e4c038aaef5 /spec/unit/runner_spec.rb
parenta1f9544e2ad149febbdd3e9acaacfec0323c20dd (diff)
downloadchef-ddb93d1d20205565fd7092e2fdeca3efddb00698.tar.gz
Chef-13: remove Chef::Platform.set and related methods
Switch over the Chef-12.0 ProviderResolver is now completed. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'spec/unit/runner_spec.rb')
-rw-r--r--spec/unit/runner_spec.rb21
1 files changed, 1 insertions, 20 deletions
diff --git a/spec/unit/runner_spec.rb b/spec/unit/runner_spec.rb
index 4e7f4d6671..ea721965c7 100644
--- a/spec/unit/runner_spec.rb
+++ b/spec/unit/runner_spec.rb
@@ -1,6 +1,6 @@
# Author:: Adam Jacob (<adam@chef.io>)
-# Copyright:: Copyright 2008-2016, Chef Software Inc.
+# Copyright:: Copyright 2008-2017, Chef Software Inc.
# License:: Apache License, Version 2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -98,25 +98,6 @@ describe Chef::Runner do
run_context.resource_collection << first_resource
end
- context "when we fall through to old Chef::Platform resolution" do
- let(:provider_resolver) { Chef::ProviderResolver.new(node, first_resource, nil) }
- before do
- Chef::Config[:treat_deprecation_warnings_as_errors] = false
- # set up old Chef::Platform resolution instead of provider_resolver
- Chef::Platform.set(
- :resource => :cat,
- :provider => Chef::Provider::SnakeOil
- )
- allow(Chef::ProviderResolver).to receive(:new).and_return(provider_resolver)
- allow(provider_resolver).to receive(:maybe_dynamic_provider_resolution).with(first_resource, anything()).and_return(nil)
- end
-
- it "should use the platform provider if it has one" do
- expect(Chef::Platform).to receive(:find_provider_for_node).with(node, first_resource).and_call_original
- runner.converge
- end
- end
-
context "when we are doing dynamic provider resolution" do
it "should pass each resource in the collection to a provider" do