diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2018-07-02 10:25:16 -0700 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2018-07-02 10:25:16 -0700 |
commit | 35603c7ce1bd3ccf35334ed65152140f0ecaf080 (patch) | |
tree | 452c84ce196ce00d672c71a8fa65f86c5a074fac /spec/functional/dsl | |
parent | eda2808dce8146bfdb308dd658b1dd565df3562b (diff) | |
download | chef-35603c7ce1bd3ccf35334ed65152140f0ecaf080.tar.gz |
fix Style/HashSyntax
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'spec/functional/dsl')
-rw-r--r-- | spec/functional/dsl/reboot_pending_spec.rb | 6 | ||||
-rw-r--r-- | spec/functional/dsl/registry_helper_spec.rb | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/spec/functional/dsl/reboot_pending_spec.rb b/spec/functional/dsl/reboot_pending_spec.rb index c7a93c6822..ff7fd574b1 100644 --- a/spec/functional/dsl/reboot_pending_spec.rb +++ b/spec/functional/dsl/reboot_pending_spec.rb @@ -42,19 +42,19 @@ describe Chef::DSL::RebootPending, :windows_only do describe 'HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\PendingFileRenameOperations' do let(:reg_key) { 'HKLM\SYSTEM\CurrentControlSet\Control\Session Manager' } - let(:original_set) { registry.value_exists?(reg_key, { :name => "PendingFileRenameOperations" }) } + let(:original_set) { registry.value_exists?(reg_key, { name: "PendingFileRenameOperations" }) } it "returns true if the registry value exists" do skip "found existing registry key" if original_set registry.set_value(reg_key, - { :name => "PendingFileRenameOperations", :type => :multi_string, :data => ['\??\C:\foo.txt|\??\C:\bar.txt'] }) + { name: "PendingFileRenameOperations", type: :multi_string, data: ['\??\C:\foo.txt|\??\C:\bar.txt'] }) expect(recipe.reboot_pending?).to be_truthy end after do unless original_set - registry.delete_value(reg_key, { :name => "PendingFileRenameOperations" }) + registry.delete_value(reg_key, { name: "PendingFileRenameOperations" }) end end end diff --git a/spec/functional/dsl/registry_helper_spec.rb b/spec/functional/dsl/registry_helper_spec.rb index d90d5090e4..7a56ee11cf 100644 --- a/spec/functional/dsl/registry_helper_spec.rb +++ b/spec/functional/dsl/registry_helper_spec.rb @@ -42,7 +42,7 @@ describe Chef::Resource::RegistryKey, :windows_only do end it "returns true if registry has specified value" do values = @resource.registry_get_values("HKCU\\Software\\Root") - expect(values.include?({ :name => "RootType1", :type => :string, :data => "fibrous" })).to eq(true) + expect(values.include?({ name: "RootType1", type: :string, data: "fibrous" })).to eq(true) end it "returns true if specified registry_has_subkey" do expect(@resource.registry_has_subkeys?("HKCU\\Software\\Root")).to eq(true) @@ -52,10 +52,10 @@ describe Chef::Resource::RegistryKey, :windows_only do expect(subkeys.include?("Branch")).to eq(true) end it "returns true if registry_value_exists" do - expect(@resource.registry_value_exists?("HKCU\\Software\\Root", { :name => "RootType1", :type => :string, :data => "fibrous" })).to eq(true) + expect(@resource.registry_value_exists?("HKCU\\Software\\Root", { name: "RootType1", type: :string, data: "fibrous" })).to eq(true) end it "returns true if data_value_exists" do - expect(@resource.registry_data_exists?("HKCU\\Software\\Root", { :name => "RootType1", :type => :string, :data => "fibrous" })).to eq(true) + expect(@resource.registry_data_exists?("HKCU\\Software\\Root", { name: "RootType1", type: :string, data: "fibrous" })).to eq(true) end end end |