From 6290f4b25e0ccf28ad738a536aba8d15ea4fd11c Mon Sep 17 00:00:00 2001 From: Ryan Cragun Date: Thu, 19 Jun 2014 18:33:17 -0700 Subject: [OC-11667] Don't overwrite the :default provider map if :default is passed as the platform --- spec/unit/platform_spec.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'spec/unit/platform_spec.rb') diff --git a/spec/unit/platform_spec.rb b/spec/unit/platform_spec.rb index 3d7aef98a0..029fc29aae 100644 --- a/spec/unit/platform_spec.rb +++ b/spec/unit/platform_spec.rb @@ -254,6 +254,16 @@ describe Chef::Platform do end + it "does not overwrite the platform map when using :default platform" do + Chef::Platform.set( + :resource => :file, + :platform => :default, + :provider => "new school" + ) + Chef::Platform.platforms[:default][:file].should eql("new school") + Chef::Platform.platforms[:default][:cat].should eql("nice") + end + end context "while testing the configured platform data" do -- cgit v1.2.1