diff options
author | Ryan Davis <ryand-ruby@zenspider.com> | 2020-03-06 17:46:03 -0800 |
---|---|---|
committer | Tim Smith <tsmith84@gmail.com> | 2020-03-16 11:56:53 -0700 |
commit | 6e826423e240d71017a4fc9ab9f25f490ec859ad (patch) | |
tree | 255da99fccd2a05a793731b172e8be9ea18b6b07 | |
parent | 49ad29e0b7607103e32853fc8e3cf67c6d308b90 (diff) | |
download | chef-6e826423e240d71017a4fc9ab9f25f490ec859ad.tar.gz |
Fix all(?) circular requires coming from the specs.
Lots more in lib, but that's out of scope for this. I'm just trying to
make it easier to debug a failing spec when needed.
Signed-off-by: Ryan Davis <zenspider@chef.io>
83 files changed, 76 insertions, 14 deletions
diff --git a/lib/chef/application.rb b/lib/chef/application.rb index 02d4a4bacb..9e92c4e8c6 100644 --- a/lib/chef/application.rb +++ b/lib/chef/application.rb @@ -19,7 +19,6 @@ require "pp" unless defined?(PP) require "socket" unless defined?(Socket) require_relative "config" -require_relative "config_fetcher" require_relative "exceptions" require_relative "local_mode" require_relative "log" @@ -119,6 +118,7 @@ class Chef # @api private (test injection) def chef_configfetcher + require_relative "config_fetcher" Chef::ConfigFetcher end diff --git a/spec/integration/client/client_spec.rb b/spec/integration/client/client_spec.rb index e2d1c9532e..24ec35d5e0 100644 --- a/spec/integration/client/client_spec.rb +++ b/spec/integration/client/client_spec.rb @@ -1,3 +1,4 @@ +require "spec_helper" require "support/shared/integration/integration_helper" require "chef/mixin/shell_out" require "tiny_server" diff --git a/spec/integration/client/exit_code_spec.rb b/spec/integration/client/exit_code_spec.rb index 37999ab431..a2f7e87b7e 100644 --- a/spec/integration/client/exit_code_spec.rb +++ b/spec/integration/client/exit_code_spec.rb @@ -1,4 +1,5 @@ +require "spec_helper" require "support/shared/integration/integration_helper" require "chef/mixin/shell_out" require "tiny_server" diff --git a/spec/integration/client/ipv6_spec.rb b/spec/integration/client/ipv6_spec.rb index 2d16786334..3d2c8d83d9 100644 --- a/spec/integration/client/ipv6_spec.rb +++ b/spec/integration/client/ipv6_spec.rb @@ -15,6 +15,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +require "spec_helper" require "support/shared/integration/integration_helper" require "chef/mixin/shell_out" diff --git a/spec/integration/knife/chef_fs_data_store_spec.rb b/spec/integration/knife/chef_fs_data_store_spec.rb index 95fee18257..d79b1922ac 100644 --- a/spec/integration/knife/chef_fs_data_store_spec.rb +++ b/spec/integration/knife/chef_fs_data_store_spec.rb @@ -15,6 +15,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +require "spec_helper" require "support/shared/integration/integration_helper" require "chef/knife/list" require "chef/knife/delete" diff --git a/spec/integration/knife/chef_repo_path_spec.rb b/spec/integration/knife/chef_repo_path_spec.rb index 7d98b7ad4e..0393d27706 100644 --- a/spec/integration/knife/chef_repo_path_spec.rb +++ b/spec/integration/knife/chef_repo_path_spec.rb @@ -15,6 +15,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +require "spec_helper" require "support/shared/integration/integration_helper" require "support/shared/context/config" require "chef/knife/list" diff --git a/spec/integration/knife/chef_repository_file_system_spec.rb b/spec/integration/knife/chef_repository_file_system_spec.rb index 6e9c4611e2..efdde6265b 100644 --- a/spec/integration/knife/chef_repository_file_system_spec.rb +++ b/spec/integration/knife/chef_repository_file_system_spec.rb @@ -15,6 +15,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +require "spec_helper" require "support/shared/integration/integration_helper" require "chef/knife/list" require "chef/knife/show" diff --git a/spec/integration/knife/chefignore_spec.rb b/spec/integration/knife/chefignore_spec.rb index b92fb1f485..6dac18f8fa 100644 --- a/spec/integration/knife/chefignore_spec.rb +++ b/spec/integration/knife/chefignore_spec.rb @@ -15,6 +15,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +require "spec_helper" require "support/shared/integration/integration_helper" require "chef/knife/list" require "chef/knife/show" diff --git a/spec/integration/knife/client_bulk_delete_spec.rb b/spec/integration/knife/client_bulk_delete_spec.rb index 73dd1680b2..3d3e8f630c 100644 --- a/spec/integration/knife/client_bulk_delete_spec.rb +++ b/spec/integration/knife/client_bulk_delete_spec.rb @@ -14,6 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +require "spec_helper" require "support/shared/integration/integration_helper" require "support/shared/context/config" diff --git a/spec/integration/knife/client_create_spec.rb b/spec/integration/knife/client_create_spec.rb index 505358923b..14ac17b810 100644 --- a/spec/integration/knife/client_create_spec.rb +++ b/spec/integration/knife/client_create_spec.rb @@ -14,6 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +require "spec_helper" require "support/shared/integration/integration_helper" require "support/shared/context/config" require "openssl" diff --git a/spec/integration/knife/client_delete_spec.rb b/spec/integration/knife/client_delete_spec.rb index 3ba51fca96..c7b9bbca35 100644 --- a/spec/integration/knife/client_delete_spec.rb +++ b/spec/integration/knife/client_delete_spec.rb @@ -14,6 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +require "spec_helper" require "support/shared/integration/integration_helper" require "support/shared/context/config" diff --git a/spec/integration/knife/client_key_create_spec.rb b/spec/integration/knife/client_key_create_spec.rb index 7ccec8bffd..cc958a85f6 100644 --- a/spec/integration/knife/client_key_create_spec.rb +++ b/spec/integration/knife/client_key_create_spec.rb @@ -14,6 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +require "spec_helper" require "support/shared/integration/integration_helper" require "support/shared/context/config" require "openssl" diff --git a/spec/integration/knife/client_key_delete_spec.rb b/spec/integration/knife/client_key_delete_spec.rb index 04826bb0b8..259996a3f2 100644 --- a/spec/integration/knife/client_key_delete_spec.rb +++ b/spec/integration/knife/client_key_delete_spec.rb @@ -14,6 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +require "spec_helper" require "support/shared/integration/integration_helper" require "support/shared/context/config" diff --git a/spec/integration/knife/client_key_list_spec.rb b/spec/integration/knife/client_key_list_spec.rb index 4fd18a6cd5..37f9a84347 100644 --- a/spec/integration/knife/client_key_list_spec.rb +++ b/spec/integration/knife/client_key_list_spec.rb @@ -14,6 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +require "spec_helper" require "support/shared/integration/integration_helper" require "support/shared/context/config" require "date" diff --git a/spec/integration/knife/client_key_show_spec.rb b/spec/integration/knife/client_key_show_spec.rb index e96ff3b6fe..0b1561d64f 100644 --- a/spec/integration/knife/client_key_show_spec.rb +++ b/spec/integration/knife/client_key_show_spec.rb @@ -14,6 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +require "spec_helper" require "support/shared/integration/integration_helper" require "support/shared/context/config" require "date" diff --git a/spec/integration/knife/client_list_spec.rb b/spec/integration/knife/client_list_spec.rb index 27ceecf7de..bf7ba74f2f 100644 --- a/spec/integration/knife/client_list_spec.rb +++ b/spec/integration/knife/client_list_spec.rb @@ -14,6 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +require "spec_helper" require "support/shared/integration/integration_helper" require "support/shared/context/config" diff --git a/spec/integration/knife/client_show_spec.rb b/spec/integration/knife/client_show_spec.rb index 23ac204d77..36bb0bebd0 100644 --- a/spec/integration/knife/client_show_spec.rb +++ b/spec/integration/knife/client_show_spec.rb @@ -14,6 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +require "spec_helper" require "support/shared/integration/integration_helper" require "support/shared/context/config" diff --git a/spec/integration/knife/common_options_spec.rb b/spec/integration/knife/common_options_spec.rb index 5eac571a85..d7b14aa93c 100644 --- a/spec/integration/knife/common_options_spec.rb +++ b/spec/integration/knife/common_options_spec.rb @@ -15,6 +15,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +require "spec_helper" require "support/shared/integration/integration_helper" require "chef/knife/raw" diff --git a/spec/integration/knife/config_get_profile_spec.rb b/spec/integration/knife/config_get_profile_spec.rb index d17d572f13..4991532f14 100644 --- a/spec/integration/knife/config_get_profile_spec.rb +++ b/spec/integration/knife/config_get_profile_spec.rb @@ -13,6 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +require "spec_helper" require "support/shared/integration/integration_helper" require "support/shared/context/config" diff --git a/spec/integration/knife/config_get_spec.rb b/spec/integration/knife/config_get_spec.rb index 7719ee2bd0..e6b97aa9a3 100644 --- a/spec/integration/knife/config_get_spec.rb +++ b/spec/integration/knife/config_get_spec.rb @@ -13,6 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +require "spec_helper" require "support/shared/integration/integration_helper" require "support/shared/context/config" diff --git a/spec/integration/knife/config_list_profiles_spec.rb b/spec/integration/knife/config_list_profiles_spec.rb index 7ac4ef755e..95a06ffaee 100644 --- a/spec/integration/knife/config_list_profiles_spec.rb +++ b/spec/integration/knife/config_list_profiles_spec.rb @@ -13,6 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +require "spec_helper" require "support/shared/integration/integration_helper" require "support/shared/context/config" diff --git a/spec/integration/knife/config_use_profile_spec.rb b/spec/integration/knife/config_use_profile_spec.rb index 4ea9012212..213fe19f88 100644 --- a/spec/integration/knife/config_use_profile_spec.rb +++ b/spec/integration/knife/config_use_profile_spec.rb @@ -13,6 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +require "spec_helper" require "support/shared/integration/integration_helper" require "support/shared/context/config" diff --git a/spec/integration/knife/cookbook_api_ipv6_spec.rb b/spec/integration/knife/cookbook_api_ipv6_spec.rb index c615d8de7a..f2c4539bf8 100644 --- a/spec/integration/knife/cookbook_api_ipv6_spec.rb +++ b/spec/integration/knife/cookbook_api_ipv6_spec.rb @@ -15,6 +15,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +require "spec_helper" require "support/shared/integration/integration_helper" require "chef/mixin/shell_out" diff --git a/spec/integration/knife/cookbook_bulk_delete_spec.rb b/spec/integration/knife/cookbook_bulk_delete_spec.rb index 5b8dc3a952..2e8e96de12 100644 --- a/spec/integration/knife/cookbook_bulk_delete_spec.rb +++ b/spec/integration/knife/cookbook_bulk_delete_spec.rb @@ -14,6 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +require "spec_helper" require "support/shared/integration/integration_helper" require "support/shared/context/config" require "chef/knife/cookbook_bulk_delete" diff --git a/spec/integration/knife/cookbook_download_spec.rb b/spec/integration/knife/cookbook_download_spec.rb index 538c06802b..0e92430aaf 100644 --- a/spec/integration/knife/cookbook_download_spec.rb +++ b/spec/integration/knife/cookbook_download_spec.rb @@ -14,6 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +require "spec_helper" require "support/shared/integration/integration_helper" require "support/shared/context/config" require "chef/knife/cookbook_download" diff --git a/spec/integration/knife/cookbook_list_spec.rb b/spec/integration/knife/cookbook_list_spec.rb index c9e4069a44..92412038a1 100644 --- a/spec/integration/knife/cookbook_list_spec.rb +++ b/spec/integration/knife/cookbook_list_spec.rb @@ -14,6 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +require "spec_helper" require "support/shared/integration/integration_helper" require "support/shared/context/config" require "chef/knife/cookbook_list" diff --git a/spec/integration/knife/cookbook_show_spec.rb b/spec/integration/knife/cookbook_show_spec.rb index 8ebd5403ae..32b1324a0a 100644 --- a/spec/integration/knife/cookbook_show_spec.rb +++ b/spec/integration/knife/cookbook_show_spec.rb @@ -14,6 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +require "spec_helper" require "support/shared/integration/integration_helper" require "support/shared/context/config" require "chef/knife/cookbook_show" diff --git a/spec/integration/knife/cookbook_upload_spec.rb b/spec/integration/knife/cookbook_upload_spec.rb index 6496a911b0..7253b4c350 100644 --- a/spec/integration/knife/cookbook_upload_spec.rb +++ b/spec/integration/knife/cookbook_upload_spec.rb @@ -14,6 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +require "spec_helper" require "support/shared/integration/integration_helper" require "support/shared/context/config" require "chef/knife/cookbook_upload" diff --git a/spec/integration/knife/data_bag_create_spec.rb b/spec/integration/knife/data_bag_create_spec.rb index e60f3c06fd..13007cc35d 100644 --- a/spec/integration/knife/data_bag_create_spec.rb +++ b/spec/integration/knife/data_bag_create_spec.rb @@ -14,6 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +require "spec_helper" require "support/shared/integration/integration_helper" require "support/shared/context/config" require "chef/knife/data_bag_create" diff --git a/spec/integration/knife/data_bag_delete_spec.rb b/spec/integration/knife/data_bag_delete_spec.rb index b5ee1b0422..3ccc718678 100644 --- a/spec/integration/knife/data_bag_delete_spec.rb +++ b/spec/integration/knife/data_bag_delete_spec.rb @@ -14,6 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +require "spec_helper" require "support/shared/integration/integration_helper" require "support/shared/context/config" require "chef/knife/data_bag_delete" diff --git a/spec/integration/knife/data_bag_edit_spec.rb b/spec/integration/knife/data_bag_edit_spec.rb index cb3e84b9c6..8e3f580630 100644 --- a/spec/integration/knife/data_bag_edit_spec.rb +++ b/spec/integration/knife/data_bag_edit_spec.rb @@ -14,6 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +require "spec_helper" require "support/shared/integration/integration_helper" require "support/shared/context/config" require "chef/knife/data_bag_edit" diff --git a/spec/integration/knife/data_bag_from_file_spec.rb b/spec/integration/knife/data_bag_from_file_spec.rb index 5083153e91..f2d0247caf 100644 --- a/spec/integration/knife/data_bag_from_file_spec.rb +++ b/spec/integration/knife/data_bag_from_file_spec.rb @@ -14,6 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +require "spec_helper" require "support/shared/integration/integration_helper" require "support/shared/context/config" diff --git a/spec/integration/knife/data_bag_list_spec.rb b/spec/integration/knife/data_bag_list_spec.rb index 2e57cc7cca..690b257810 100644 --- a/spec/integration/knife/data_bag_list_spec.rb +++ b/spec/integration/knife/data_bag_list_spec.rb @@ -14,6 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +require "spec_helper" require "support/shared/integration/integration_helper" require "support/shared/context/config" require "chef/knife/data_bag_list" diff --git a/spec/integration/knife/data_bag_show_spec.rb b/spec/integration/knife/data_bag_show_spec.rb index 35f12f9619..be1a9bd0e8 100644 --- a/spec/integration/knife/data_bag_show_spec.rb +++ b/spec/integration/knife/data_bag_show_spec.rb @@ -14,6 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +require "spec_helper" require "support/shared/integration/integration_helper" require "support/shared/context/config" require "chef/knife/data_bag_show" diff --git a/spec/integration/knife/delete_spec.rb b/spec/integration/knife/delete_spec.rb index fd5853dfef..c046834104 100644 --- a/spec/integration/knife/delete_spec.rb +++ b/spec/integration/knife/delete_spec.rb @@ -15,6 +15,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +require "spec_helper" require "support/shared/integration/integration_helper" require "chef/knife/delete" require "chef/knife/list" diff --git a/spec/integration/knife/deps_spec.rb b/spec/integration/knife/deps_spec.rb index cd1783f014..eca7cbd0ac 100644 --- a/spec/integration/knife/deps_spec.rb +++ b/spec/integration/knife/deps_spec.rb @@ -15,6 +15,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +require "spec_helper" require "support/shared/integration/integration_helper" require "support/shared/context/config" require "chef/knife/deps" diff --git a/spec/integration/knife/diff_spec.rb b/spec/integration/knife/diff_spec.rb index 87cbd1559d..dccab65679 100644 --- a/spec/integration/knife/diff_spec.rb +++ b/spec/integration/knife/diff_spec.rb @@ -15,6 +15,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +require "spec_helper" require "support/shared/integration/integration_helper" require "chef/knife/diff" diff --git a/spec/integration/knife/download_spec.rb b/spec/integration/knife/download_spec.rb index 77f6d3890e..ab6ff8d9e3 100644 --- a/spec/integration/knife/download_spec.rb +++ b/spec/integration/knife/download_spec.rb @@ -15,6 +15,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +require "spec_helper" require "support/shared/integration/integration_helper" require "chef/knife/download" require "chef/knife/diff" diff --git a/spec/integration/knife/environment_compare_spec.rb b/spec/integration/knife/environment_compare_spec.rb index 713c1efe12..39baf5c6b7 100644 --- a/spec/integration/knife/environment_compare_spec.rb +++ b/spec/integration/knife/environment_compare_spec.rb @@ -14,6 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +require "spec_helper" require "support/shared/integration/integration_helper" require "support/shared/context/config" diff --git a/spec/integration/knife/environment_create_spec.rb b/spec/integration/knife/environment_create_spec.rb index 2647a08f8b..cf4b8b38eb 100644 --- a/spec/integration/knife/environment_create_spec.rb +++ b/spec/integration/knife/environment_create_spec.rb @@ -14,6 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +require "spec_helper" require "support/shared/integration/integration_helper" require "support/shared/context/config" diff --git a/spec/integration/knife/environment_delete_spec.rb b/spec/integration/knife/environment_delete_spec.rb index 0f1fe5c4a8..579b3a67d9 100644 --- a/spec/integration/knife/environment_delete_spec.rb +++ b/spec/integration/knife/environment_delete_spec.rb @@ -14,6 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +require "spec_helper" require "support/shared/integration/integration_helper" require "support/shared/context/config" diff --git a/spec/integration/knife/environment_from_file_spec.rb b/spec/integration/knife/environment_from_file_spec.rb index 8b33e254d8..472ae4d511 100644 --- a/spec/integration/knife/environment_from_file_spec.rb +++ b/spec/integration/knife/environment_from_file_spec.rb @@ -14,6 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +require "spec_helper" require "support/shared/integration/integration_helper" require "support/shared/context/config" diff --git a/spec/integration/knife/environment_list_spec.rb b/spec/integration/knife/environment_list_spec.rb index b6b25e8661..19fde490ef 100644 --- a/spec/integration/knife/environment_list_spec.rb +++ b/spec/integration/knife/environment_list_spec.rb @@ -14,6 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +require "spec_helper" require "support/shared/integration/integration_helper" require "support/shared/context/config" diff --git a/spec/integration/knife/environment_show_spec.rb b/spec/integration/knife/environment_show_spec.rb index c0334ecbf3..157c108c46 100644 --- a/spec/integration/knife/environment_show_spec.rb +++ b/spec/integration/knife/environment_show_spec.rb @@ -14,6 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +require "spec_helper" require "support/shared/integration/integration_helper" require "support/shared/context/config" diff --git a/spec/integration/knife/list_spec.rb b/spec/integration/knife/list_spec.rb index 9689c9e6c8..b1d77d3b01 100644 --- a/spec/integration/knife/list_spec.rb +++ b/spec/integration/knife/list_spec.rb @@ -15,6 +15,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +require "spec_helper" require "support/shared/integration/integration_helper" require "support/shared/context/config" require "chef/knife/list" diff --git a/spec/integration/knife/node_bulk_delete_spec.rb b/spec/integration/knife/node_bulk_delete_spec.rb index 4dce471150..957d6375dc 100644 --- a/spec/integration/knife/node_bulk_delete_spec.rb +++ b/spec/integration/knife/node_bulk_delete_spec.rb @@ -14,6 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +require "spec_helper" require "support/shared/integration/integration_helper" require "support/shared/context/config" diff --git a/spec/integration/knife/node_create_spec.rb b/spec/integration/knife/node_create_spec.rb index 36778b3dfa..8b18663193 100644 --- a/spec/integration/knife/node_create_spec.rb +++ b/spec/integration/knife/node_create_spec.rb @@ -14,6 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +require "spec_helper" require "support/shared/integration/integration_helper" require "support/shared/context/config" require "openssl" diff --git a/spec/integration/knife/node_delete_spec.rb b/spec/integration/knife/node_delete_spec.rb index a578ae912e..e782bdd549 100644 --- a/spec/integration/knife/node_delete_spec.rb +++ b/spec/integration/knife/node_delete_spec.rb @@ -14,6 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +require "spec_helper" require "support/shared/integration/integration_helper" require "support/shared/context/config" diff --git a/spec/integration/knife/node_environment_set_spec.rb b/spec/integration/knife/node_environment_set_spec.rb index 96251f6351..b2316a3590 100644 --- a/spec/integration/knife/node_environment_set_spec.rb +++ b/spec/integration/knife/node_environment_set_spec.rb @@ -14,6 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +require "spec_helper" require "support/shared/integration/integration_helper" require "support/shared/context/config" diff --git a/spec/integration/knife/node_from_file_spec.rb b/spec/integration/knife/node_from_file_spec.rb index 8a2dddb76e..c563fa328e 100644 --- a/spec/integration/knife/node_from_file_spec.rb +++ b/spec/integration/knife/node_from_file_spec.rb @@ -14,6 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +require "spec_helper" require "support/shared/integration/integration_helper" require "support/shared/context/config" diff --git a/spec/integration/knife/node_list_spec.rb b/spec/integration/knife/node_list_spec.rb index 9e5378f121..b6079d72ba 100644 --- a/spec/integration/knife/node_list_spec.rb +++ b/spec/integration/knife/node_list_spec.rb @@ -14,6 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +require "spec_helper" require "support/shared/integration/integration_helper" require "support/shared/context/config" diff --git a/spec/integration/knife/node_run_list_add_spec.rb b/spec/integration/knife/node_run_list_add_spec.rb index 87d08e1975..542746a51e 100644 --- a/spec/integration/knife/node_run_list_add_spec.rb +++ b/spec/integration/knife/node_run_list_add_spec.rb @@ -14,6 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +require "spec_helper" require "support/shared/integration/integration_helper" require "support/shared/context/config" diff --git a/spec/integration/knife/node_run_list_remove_spec.rb b/spec/integration/knife/node_run_list_remove_spec.rb index e85e3ed8e8..0fcb80300c 100644 --- a/spec/integration/knife/node_run_list_remove_spec.rb +++ b/spec/integration/knife/node_run_list_remove_spec.rb @@ -14,6 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +require "spec_helper" require "support/shared/integration/integration_helper" require "support/shared/context/config" diff --git a/spec/integration/knife/node_run_list_set_spec.rb b/spec/integration/knife/node_run_list_set_spec.rb index ec6b08fb97..d80920d299 100644 --- a/spec/integration/knife/node_run_list_set_spec.rb +++ b/spec/integration/knife/node_run_list_set_spec.rb @@ -14,6 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +require "spec_helper" require "support/shared/integration/integration_helper" require "support/shared/context/config" diff --git a/spec/integration/knife/node_show_spec.rb b/spec/integration/knife/node_show_spec.rb index dd890aed59..ac32ab165d 100644 --- a/spec/integration/knife/node_show_spec.rb +++ b/spec/integration/knife/node_show_spec.rb @@ -14,6 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +require "spec_helper" require "support/shared/integration/integration_helper" require "support/shared/context/config" diff --git a/spec/integration/knife/raw_spec.rb b/spec/integration/knife/raw_spec.rb index d5c4d59f30..51d7759063 100644 --- a/spec/integration/knife/raw_spec.rb +++ b/spec/integration/knife/raw_spec.rb @@ -15,6 +15,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +require "spec_helper" require "support/shared/integration/integration_helper" require "support/shared/context/config" require "chef/knife/raw" diff --git a/spec/integration/knife/redirection_spec.rb b/spec/integration/knife/redirection_spec.rb index fe39315fe4..a1c8d4d9ab 100644 --- a/spec/integration/knife/redirection_spec.rb +++ b/spec/integration/knife/redirection_spec.rb @@ -15,6 +15,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +require "spec_helper" require "tiny_server" require "support/shared/integration/integration_helper" require "support/shared/context/config" diff --git a/spec/integration/knife/role_bulk_delete_spec.rb b/spec/integration/knife/role_bulk_delete_spec.rb index 36d1cb2041..9f73c3c65d 100644 --- a/spec/integration/knife/role_bulk_delete_spec.rb +++ b/spec/integration/knife/role_bulk_delete_spec.rb @@ -14,6 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +require "spec_helper" require "support/shared/integration/integration_helper" require "support/shared/context/config" diff --git a/spec/integration/knife/role_create_spec.rb b/spec/integration/knife/role_create_spec.rb index 54ade9de09..723ca5bf48 100644 --- a/spec/integration/knife/role_create_spec.rb +++ b/spec/integration/knife/role_create_spec.rb @@ -14,6 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +require "spec_helper" require "support/shared/integration/integration_helper" require "support/shared/context/config" diff --git a/spec/integration/knife/role_delete_spec.rb b/spec/integration/knife/role_delete_spec.rb index aa12de57e8..7642159451 100644 --- a/spec/integration/knife/role_delete_spec.rb +++ b/spec/integration/knife/role_delete_spec.rb @@ -14,6 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +require "spec_helper" require "support/shared/integration/integration_helper" require "support/shared/context/config" diff --git a/spec/integration/knife/role_from_file_spec.rb b/spec/integration/knife/role_from_file_spec.rb index 69f58e8c36..e395f7a0ef 100644 --- a/spec/integration/knife/role_from_file_spec.rb +++ b/spec/integration/knife/role_from_file_spec.rb @@ -14,6 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +require "spec_helper" require "support/shared/integration/integration_helper" require "support/shared/context/config" diff --git a/spec/integration/knife/role_list_spec.rb b/spec/integration/knife/role_list_spec.rb index e718425cee..709f533e44 100644 --- a/spec/integration/knife/role_list_spec.rb +++ b/spec/integration/knife/role_list_spec.rb @@ -14,6 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +require "spec_helper" require "support/shared/integration/integration_helper" require "support/shared/context/config" diff --git a/spec/integration/knife/role_show_spec.rb b/spec/integration/knife/role_show_spec.rb index 07afd19440..2af1696c04 100644 --- a/spec/integration/knife/role_show_spec.rb +++ b/spec/integration/knife/role_show_spec.rb @@ -14,6 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +require "spec_helper" require "support/shared/integration/integration_helper" require "support/shared/context/config" diff --git a/spec/integration/knife/search_node_spec.rb b/spec/integration/knife/search_node_spec.rb index e3cda1a138..6bce1a85d7 100644 --- a/spec/integration/knife/search_node_spec.rb +++ b/spec/integration/knife/search_node_spec.rb @@ -14,6 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +require "spec_helper" require "support/shared/integration/integration_helper" require "support/shared/context/config" diff --git a/spec/integration/knife/show_spec.rb b/spec/integration/knife/show_spec.rb index 9ddd6ffaae..68096a1c2d 100644 --- a/spec/integration/knife/show_spec.rb +++ b/spec/integration/knife/show_spec.rb @@ -15,6 +15,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +require "spec_helper" require "support/shared/integration/integration_helper" require "support/shared/context/config" require "chef/knife/show" diff --git a/spec/integration/knife/upload_spec.rb b/spec/integration/knife/upload_spec.rb index 5e151515e2..9ca6da9db1 100644 --- a/spec/integration/knife/upload_spec.rb +++ b/spec/integration/knife/upload_spec.rb @@ -15,6 +15,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +require "spec_helper" require "support/shared/integration/integration_helper" require "chef/knife/upload" require "chef/knife/diff" diff --git a/spec/integration/recipes/accumulator_spec.rb b/spec/integration/recipes/accumulator_spec.rb index 98e3581071..e0ecfd340a 100644 --- a/spec/integration/recipes/accumulator_spec.rb +++ b/spec/integration/recipes/accumulator_spec.rb @@ -1,3 +1,4 @@ +require "spec_helper" require "support/shared/integration/integration_helper" require "chef/mixin/shell_out" diff --git a/spec/integration/recipes/lwrp_inline_resources_spec.rb b/spec/integration/recipes/lwrp_inline_resources_spec.rb index b41b9342b0..833f866db4 100644 --- a/spec/integration/recipes/lwrp_inline_resources_spec.rb +++ b/spec/integration/recipes/lwrp_inline_resources_spec.rb @@ -1,3 +1,4 @@ +require "spec_helper" require "support/shared/integration/integration_helper" require "chef/mixin/shell_out" diff --git a/spec/integration/recipes/lwrp_spec.rb b/spec/integration/recipes/lwrp_spec.rb index 957c1ea66f..1c772a378f 100644 --- a/spec/integration/recipes/lwrp_spec.rb +++ b/spec/integration/recipes/lwrp_spec.rb @@ -1,3 +1,4 @@ +require "spec_helper" require "support/shared/integration/integration_helper" require "chef/mixin/shell_out" diff --git a/spec/integration/recipes/notifies_spec.rb b/spec/integration/recipes/notifies_spec.rb index ae534dcad4..9990e81fe5 100644 --- a/spec/integration/recipes/notifies_spec.rb +++ b/spec/integration/recipes/notifies_spec.rb @@ -1,3 +1,4 @@ +require "spec_helper" require "support/shared/integration/integration_helper" require "chef/mixin/shell_out" diff --git a/spec/integration/recipes/notifying_block_spec.rb b/spec/integration/recipes/notifying_block_spec.rb index 465eca97ed..12095f0b54 100644 --- a/spec/integration/recipes/notifying_block_spec.rb +++ b/spec/integration/recipes/notifying_block_spec.rb @@ -15,6 +15,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +require "spec_helper" require "support/shared/integration/integration_helper" require "chef/mixin/shell_out" diff --git a/spec/integration/recipes/recipe_dsl_spec.rb b/spec/integration/recipes/recipe_dsl_spec.rb index e56ffa87bf..b939317c62 100644 --- a/spec/integration/recipes/recipe_dsl_spec.rb +++ b/spec/integration/recipes/recipe_dsl_spec.rb @@ -1,3 +1,4 @@ +require "spec_helper" require "support/shared/integration/integration_helper" describe "Recipe DSL methods" do diff --git a/spec/integration/recipes/resource_action_spec.rb b/spec/integration/recipes/resource_action_spec.rb index 802d4976b7..9bfe86c74e 100644 --- a/spec/integration/recipes/resource_action_spec.rb +++ b/spec/integration/recipes/resource_action_spec.rb @@ -1,3 +1,4 @@ +require "spec_helper" require "support/shared/integration/integration_helper" class NoActionJackson < Chef::Resource diff --git a/spec/integration/recipes/unified_mode_spec.rb b/spec/integration/recipes/unified_mode_spec.rb index 944319f7bf..bb8cffae3f 100644 --- a/spec/integration/recipes/unified_mode_spec.rb +++ b/spec/integration/recipes/unified_mode_spec.rb @@ -1,3 +1,4 @@ +require "spec_helper" require "support/shared/integration/integration_helper" require "chef/mixin/shell_out" diff --git a/spec/integration/solo/solo_spec.rb b/spec/integration/solo/solo_spec.rb index c62b2ec6b0..c21bc7d597 100644 --- a/spec/integration/solo/solo_spec.rb +++ b/spec/integration/solo/solo_spec.rb @@ -1,3 +1,4 @@ +require "spec_helper" require "support/shared/integration/integration_helper" require "chef/mixin/shell_out" require "chef/run_lock" diff --git a/spec/support/key_helpers.rb b/spec/support/key_helpers.rb index 33b8b32de9..6a3a35fcb2 100644 --- a/spec/support/key_helpers.rb +++ b/spec/support/key_helpers.rb @@ -16,8 +16,6 @@ # limitations under the License. # -require "spec_helper" - shared_examples_for "a knife key command" do let(:stderr) { StringIO.new } let(:command) do diff --git a/spec/support/shared/context/config.rb b/spec/support/shared/context/config.rb index bb4ff7e0d1..7c4ae8dca6 100644 --- a/spec/support/shared/context/config.rb +++ b/spec/support/shared/context/config.rb @@ -7,9 +7,6 @@ # Required chef files here: require "chef/config" -# Required spec files here: -require "spec_helper" - # Basic config. Nothing fancy. shared_context "default config options" do before do diff --git a/spec/support/shared/integration/integration_helper.rb b/spec/support/shared/integration/integration_helper.rb index af57e21c73..7e52f6a9f8 100644 --- a/spec/support/shared/integration/integration_helper.rb +++ b/spec/support/shared/integration/integration_helper.rb @@ -24,7 +24,6 @@ require "chef/json_compat" require "chef/server_api" require "support/shared/integration/knife_support" require "cheffish/rspec/chef_run_support" -require "spec_helper" module Cheffish class BasicChefClient diff --git a/spec/support/shared/unit/execute_resource.rb b/spec/support/shared/unit/execute_resource.rb index 05c2fc4a9a..2d6e8de0fd 100644 --- a/spec/support/shared/unit/execute_resource.rb +++ b/spec/support/shared/unit/execute_resource.rb @@ -17,8 +17,6 @@ # limitations under the License. # -require "spec_helper" - shared_examples_for "an execute resource" do before(:each) do diff --git a/spec/support/shared/unit/provider/file.rb b/spec/support/shared/unit/provider/file.rb index 3df8eecc6f..d78eff0c90 100644 --- a/spec/support/shared/unit/provider/file.rb +++ b/spec/support/shared/unit/provider/file.rb @@ -16,7 +16,6 @@ # limitations under the License. # -require "spec_helper" require "tmpdir" if windows? require "chef/win32/file" diff --git a/spec/support/shared/unit/script_resource.rb b/spec/support/shared/unit/script_resource.rb index 3c158afd6b..018a568e58 100644 --- a/spec/support/shared/unit/script_resource.rb +++ b/spec/support/shared/unit/script_resource.rb @@ -17,8 +17,6 @@ # limitations under the License. # -require "spec_helper" - shared_examples_for "a script resource" do it "should create a new Chef::Resource::Script" do diff --git a/spec/support/shared/unit/windows_script_resource.rb b/spec/support/shared/unit/windows_script_resource.rb index 29238a3917..9e4d646ff8 100644 --- a/spec/support/shared/unit/windows_script_resource.rb +++ b/spec/support/shared/unit/windows_script_resource.rb @@ -16,8 +16,6 @@ # limitations under the License. # -require "spec_helper" - require "support/shared/unit/execute_resource" require "support/shared/unit/script_resource" diff --git a/spec/unit/provider/file_spec.rb b/spec/unit/provider/file_spec.rb index cb4be033f0..7dc0072fb5 100644 --- a/spec/unit/provider/file_spec.rb +++ b/spec/unit/provider/file_spec.rb @@ -17,6 +17,7 @@ # limitations under the License. # +require "spec_helper" require "support/shared/unit/provider/file" describe Chef::Provider::File do |