diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2019-07-03 12:26:05 -0700 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2019-07-05 12:40:44 -0700 |
commit | 4978a9a8a402477f3b35f43404701d6a5cf26fa1 (patch) | |
tree | 7f336c1fa29d7bdb50f8a6e0a2e5943fbb32ba51 /spec/unit/mixin | |
parent | 2833651dcf54db5ba8e92746b479ebafa897b275 (diff) | |
download | chef-4978a9a8a402477f3b35f43404701d6a5cf26fa1.tar.gz |
Style/EmptyLiteral
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'spec/unit/mixin')
-rw-r--r-- | spec/unit/mixin/params_validate_spec.rb | 6 | ||||
-rw-r--r-- | spec/unit/mixin/windows_architecture_helper_spec.rb | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/spec/unit/mixin/params_validate_spec.rb b/spec/unit/mixin/params_validate_spec.rb index 5f29095bcb..489742cb7d 100644 --- a/spec/unit/mixin/params_validate_spec.rb +++ b/spec/unit/mixin/params_validate_spec.rb @@ -44,7 +44,7 @@ describe Chef::Mixin::ParamsValidate do it "should require validation map keys to be symbols or strings" do expect { @vo.validate({ one: "two" }, { one: true }) }.not_to raise_error expect { @vo.validate({ one: "two" }, { "one" => true }) }.not_to raise_error - expect { @vo.validate({ one: "two" }, { Hash.new => true }) }.to raise_error(ArgumentError) + expect { @vo.validate({ one: "two" }, { {} => true }) }.to raise_error(ArgumentError) end it "should allow options to be required with true" do @@ -163,7 +163,7 @@ describe Chef::Mixin::ParamsValidate do end it "should let you set a default value with default => value" do - arguments = Hash.new + arguments = {} @vo.validate(arguments, { one: { default: "is the loneliest number", @@ -321,7 +321,7 @@ describe Chef::Mixin::ParamsValidate do end.not_to raise_error expect do @vo.validate( - { one: Hash.new }, + { one: {} }, { one: { kind_of: [ String, Array ], diff --git a/spec/unit/mixin/windows_architecture_helper_spec.rb b/spec/unit/mixin/windows_architecture_helper_spec.rb index 06acbe49c9..7d4e18d23c 100644 --- a/spec/unit/mixin/windows_architecture_helper_spec.rb +++ b/spec/unit/mixin/windows_architecture_helper_spec.rb @@ -74,7 +74,7 @@ describe Chef::Mixin::WindowsArchitectureHelper do def with_node_architecture_combinations @valid_architectures.each do |node_architecture| new_node = Chef::Node.new - new_node.default["kernel"] = Hash.new + new_node.default["kernel"] = {} new_node.default["kernel"][:machine] = node_architecture.to_s @valid_architectures.each do |architecture| |