From 217cf85876651185b33fb574de7256e5a499d499 Mon Sep 17 00:00:00 2001 From: PrajaktaPurohit Date: Tue, 11 Dec 2012 18:45:18 -0800 Subject: Fixing tests as per changed code --- spec/functional/resource/registry_spec.rb | 4 ++-- spec/functional/win32/registry_helper_spec.rb | 16 ---------------- 2 files changed, 2 insertions(+), 18 deletions(-) diff --git a/spec/functional/resource/registry_spec.rb b/spec/functional/resource/registry_spec.rb index 668afb356d..2ef359273d 100644 --- a/spec/functional/resource/registry_spec.rb +++ b/spec/functional/resource/registry_spec.rb @@ -252,7 +252,7 @@ describe Chef::Resource::RegistryKey, :windows_only do @report["resources"][0]["id"].should == reg_child + '\Ood' @report["resources"][0]["after"][:values].should == [{:name=>"ReportingVal1", :type=>:string, :data=>"report1"}, {:name=>"ReportingVal2", :type=>:string, :data=>"report2"}] - @report["resources"][0]["before"][:values].should == nil + @report["resources"][0]["before"][:values].should == [] @report["resources"][0]["result"].should == "create" @report["status"].should == "success" @report["total_res_count"].should == "1" @@ -366,7 +366,7 @@ describe Chef::Resource::RegistryKey, :windows_only do @report["resources"][0]["name"].should == resource_name @report["resources"][0]["id"].should == reg_child + '\Judoon' @report["resources"][0]["after"][:values].should == [{:name=>"ReportingVal3", :type=>:string, :data=>"report3"}] - @report["resources"][0]["before"][:values].should == nil + @report["resources"][0]["before"][:values].should == [] @report["resources"][0]["result"].should == "create_if_missing" @report["status"].should == "success" @report["total_res_count"].should == "1" diff --git a/spec/functional/win32/registry_helper_spec.rb b/spec/functional/win32/registry_helper_spec.rb index bbd53bf8e4..830d6f4777 100644 --- a/spec/functional/win32/registry_helper_spec.rb +++ b/spec/functional/win32/registry_helper_spec.rb @@ -627,22 +627,6 @@ describe 'Chef::Win32::Registry', :windows_only do end end - describe "create_value" do - it "can create a 32-bit only registry value" do - @registry.architecture = :i386 - @registry.create_value("HKLM\\Software\\Root\\Trunk\\Red", {:name=>"Buds", :type=>:string, :data=>"Closed"}).should == true - @registry.data_exists?("HKLM\\Software\\Root\\Trunk\\Red", {:name=>"Buds", :type=>:string, :data=>"Closed"}).should == true - @registry.architecture = :x86_64 - lambda{@registry.data_exists?("HKLM\\Software\\Root\\Trunk\\Red", {:name=>"Buds", :type=>:string, :data=>"Closed"})}.should raise_error(Chef::Exceptions::Win32RegKeyMissing) - end - it "can create a 64-bit only registry value" do - @registry.architecture = :x86_64 - @registry.create_value("HKLM\\Software\\Root\\Trunk\\Blue", {:name=>"Peter", :type=>:string, :data=>"Tiny"}).should == true - @registry.data_exists?("HKLM\\Software\\Root\\Trunk\\Blue", {:name=>"Peter", :type=>:string, :data=>"Tiny"}).should == true - @registry.architecture = :i386 - lambda{@registry.data_exists?("HKLM\\Software\\Root\\Trunk\\Blue", {:name=>"Peter", :type=>:string, :data=>"Tiny"})}.should raise_error(Chef::Exceptions::Win32RegKeyMissing) - end - end end end end -- cgit v1.2.1