summaryrefslogtreecommitdiff
path: root/spec/unit
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2018-07-02 18:20:06 -0700
committerLamont Granquist <lamont@scriptkiddie.org>2018-07-02 18:20:06 -0700
commit2da413fe65595e95b16e9e01afa240d5c668a03a (patch)
treeaaa60ecf50befabe0c6a5444c593275e411873d5 /spec/unit
parent5f45c98f1e2ae9ec7b95760a41d617a7a698cc19 (diff)
downloadchef-2da413fe65595e95b16e9e01afa240d5c668a03a.tar.gz
fix Style/MutableConstant
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'spec/unit')
-rw-r--r--spec/unit/chef_fs/file_system/repository/directory_spec.rb2
-rw-r--r--spec/unit/formatters/error_inspectors/compile_error_inspector_spec.rb2
-rw-r--r--spec/unit/provider/apt_repository_spec.rb4
-rw-r--r--spec/unit/provider/mount/windows_spec.rb4
-rw-r--r--spec/unit/provider/zypper_repository_spec.rb4
-rw-r--r--spec/unit/provider_resolver_spec.rb2
-rw-r--r--spec/unit/role_spec.rb2
7 files changed, 10 insertions, 10 deletions
diff --git a/spec/unit/chef_fs/file_system/repository/directory_spec.rb b/spec/unit/chef_fs/file_system/repository/directory_spec.rb
index efd17204e0..5b2a0a47b8 100644
--- a/spec/unit/chef_fs/file_system/repository/directory_spec.rb
+++ b/spec/unit/chef_fs/file_system/repository/directory_spec.rb
@@ -22,7 +22,7 @@ require "chef/chef_fs/file_system/base_fs_object"
require "chef/chef_fs/file_system/exceptions"
require "chef/chef_fs/file_system/nonexistent_fs_object"
-CHILD_FILES = %w{ test1.json test2.json skip test3.json skip2 test4 }
+CHILD_FILES = %w{ test1.json test2.json skip test3.json skip2 test4 }.freeze
class TestDirectory < Chef::ChefFS::FileSystem::Repository::Directory
def make_child_entry(name)
diff --git a/spec/unit/formatters/error_inspectors/compile_error_inspector_spec.rb b/spec/unit/formatters/error_inspectors/compile_error_inspector_spec.rb
index a09b192b6d..209d987e78 100644
--- a/spec/unit/formatters/error_inspectors/compile_error_inspector_spec.rb
+++ b/spec/unit/formatters/error_inspectors/compile_error_inspector_spec.rb
@@ -18,7 +18,7 @@
require "spec_helper"
-BAD_RECIPE = <<~E
+BAD_RECIPE = <<~E.freeze
#
# Cookbook Name:: syntax-err
# Recipe:: default
diff --git a/spec/unit/provider/apt_repository_spec.rb b/spec/unit/provider/apt_repository_spec.rb
index 8ea2b9b823..79b871eb6c 100644
--- a/spec/unit/provider/apt_repository_spec.rb
+++ b/spec/unit/provider/apt_repository_spec.rb
@@ -23,7 +23,7 @@ require "spec_helper"
#
# Output of the command:
# => apt-key adv --list-public-keys --with-fingerprint --with-colons
-APT_KEY_FINGER = <<~EOF
+APT_KEY_FINGER = <<~EOF.freeze
tru:t:1:1488924856:0:3:1:5
pub:-:1024:17:40976EAF437D05B5:2004-09-12:::-:Ubuntu Archive Automatic Signing Key <ftpmaster@ubuntu.com>::scESC:
fpr:::::::::630239CC130E1A7FD81A27B140976EAF437D05B5:
@@ -38,7 +38,7 @@ EOF
# Output of the command:
# => gpg --with-fingerprint --with-colons [FILE]
-GPG_FINGER = <<~EOF
+GPG_FINGER = <<~EOF.freeze
pub:-:1024:17:327574EE02A818DD:2009-04-22:::-:Cloudera Apt Repository:
fpr:::::::::F36A89E33CC1BD0F71079007327574EE02A818DD:
sub:-:2048:16:84080586D1CA74A1:2009-04-22::::
diff --git a/spec/unit/provider/mount/windows_spec.rb b/spec/unit/provider/mount/windows_spec.rb
index 6d55fb958c..aeff294347 100644
--- a/spec/unit/provider/mount/windows_spec.rb
+++ b/spec/unit/provider/mount/windows_spec.rb
@@ -29,8 +29,8 @@ class Chef
end
end
-GUID = "\\\\?\\Volume{578e72b5-6e70-11df-b5c5-000c29d4a7d9}\\"
-REMOTE = "\\\\server-name\\path"
+GUID = "\\\\?\\Volume{578e72b5-6e70-11df-b5c5-000c29d4a7d9}\\".freeze
+REMOTE = "\\\\server-name\\path".freeze
describe Chef::Provider::Mount::Windows do
before(:each) do
diff --git a/spec/unit/provider/zypper_repository_spec.rb b/spec/unit/provider/zypper_repository_spec.rb
index fc8ff14afb..df45c742d4 100644
--- a/spec/unit/provider/zypper_repository_spec.rb
+++ b/spec/unit/provider/zypper_repository_spec.rb
@@ -20,14 +20,14 @@ require "spec_helper"
# Output of the command:
# => rpm -qa gpg-pubkey*
-RPM_KEYS = <<~EOF
+RPM_KEYS = <<~EOF.freeze
gpg-pubkey-307e3d54-4be01a65
gpg-pubkey-3dbdc284-53674dd4
EOF
# Output of the command:
# => gpg --with-fingerprint [FILE]
-GPG_FINGER = <<~EOF
+GPG_FINGER = <<~EOF.freeze
pub 2048R/3DBDC284 2011-08-19 [expires: 2024-06-14]
Key fingerprint = 573B FD6B 3D8F BC64 1079 A6AB ABF5 BD82 7BD9 BF62
uid nginx signing key <signing-key@nginx.com>
diff --git a/spec/unit/provider_resolver_spec.rb b/spec/unit/provider_resolver_spec.rb
index cb03141c76..a3f2801adf 100644
--- a/spec/unit/provider_resolver_spec.rb
+++ b/spec/unit/provider_resolver_spec.rb
@@ -887,7 +887,7 @@ describe Chef::ProviderResolver do
},
},
},
- }
+ }.freeze
def self.create_provider_tests(providers, test, expected, filter)
expected = expected.merge(providers.select { |key, value| key.is_a?(Symbol) })
diff --git a/spec/unit/role_spec.rb b/spec/unit/role_spec.rb
index 8e73ad347d..57f1d5c6ba 100644
--- a/spec/unit/role_spec.rb
+++ b/spec/unit/role_spec.rb
@@ -245,7 +245,7 @@ describe Chef::Role do
end
end
- ROLE_DSL = <<~EOR
+ ROLE_DSL = <<~EOR.freeze
name "ceiling_cat"
description "like Aliens, but furry"
EOR