summaryrefslogtreecommitdiff
path: root/spec/unit/platform_spec.rb
diff options
context:
space:
mode:
authorRyan Cragun <me@ryan.ec>2014-06-19 18:33:17 -0700
committerRyan Cragun <me@ryan.ec>2014-06-19 18:33:17 -0700
commit6290f4b25e0ccf28ad738a536aba8d15ea4fd11c (patch)
tree0b6d71a98f599cb0389806fb8433cef3b32cee11 /spec/unit/platform_spec.rb
parent633204305f8accc3110f07fc210d86b7c6a76070 (diff)
downloadchef-6290f4b25e0ccf28ad738a536aba8d15ea4fd11c.tar.gz
[OC-11667] Don't overwrite the :default provider map if :default is passed as the platform
Diffstat (limited to 'spec/unit/platform_spec.rb')
-rw-r--r--spec/unit/platform_spec.rb10
1 files changed, 10 insertions, 0 deletions
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