From 677b8361870f54978c935ed94fd413ccff230aea Mon Sep 17 00:00:00 2001 From: Tim Smith Date: Tue, 18 Feb 2020 22:35:17 -0800 Subject: Use require_relative within the specs Simplify how we include the spec_helper via the new cookstyle rule. Signed-off-by: Tim Smith --- spec/functional/run_lock_spec.rb | 2 +- spec/functional/util/powershell/cmdlet_spec.rb | 2 +- spec/functional/version_spec.rb | 2 +- spec/unit/data_collector_spec.rb | 2 +- spec/unit/json_compat_spec.rb | 2 +- spec/unit/resource_reporter_spec.rb | 2 +- spec/unit/run_lock_spec.rb | 2 +- spec/unit/scan_access_control_spec.rb | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/spec/functional/run_lock_spec.rb b/spec/functional/run_lock_spec.rb index d9a8bd2d0e..b6e192856b 100644 --- a/spec/functional/run_lock_spec.rb +++ b/spec/functional/run_lock_spec.rb @@ -15,7 +15,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -require File.expand_path("../../spec_helper", __FILE__) +require_relative "../spec_helper" require "chef/client" describe Chef::RunLock do diff --git a/spec/functional/util/powershell/cmdlet_spec.rb b/spec/functional/util/powershell/cmdlet_spec.rb index 1c8fef2180..0bc6f4914c 100644 --- a/spec/functional/util/powershell/cmdlet_spec.rb +++ b/spec/functional/util/powershell/cmdlet_spec.rb @@ -17,7 +17,7 @@ # require "chef/json_compat" -require File.expand_path("../../../../spec_helper", __FILE__) +require_relative "../../../spec_helper" describe Chef::Util::Powershell::Cmdlet, :windows_powershell_dsc_only do before(:all) do diff --git a/spec/functional/version_spec.rb b/spec/functional/version_spec.rb index 25e3f4dba7..5501d0cfe3 100644 --- a/spec/functional/version_spec.rb +++ b/spec/functional/version_spec.rb @@ -15,7 +15,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -require File.expand_path("../../spec_helper", __FILE__) +require_relative "../spec_helper" require "chef/mixin/shell_out" require "chef/version" require "ohai/version" diff --git a/spec/unit/data_collector_spec.rb b/spec/unit/data_collector_spec.rb index 5eeeec1498..b26fffb536 100644 --- a/spec/unit/data_collector_spec.rb +++ b/spec/unit/data_collector_spec.rb @@ -15,7 +15,7 @@ # limitations under the License. # -require File.expand_path("../../spec_helper", __FILE__) +require_relative "../spec_helper" require "chef/data_collector" require "socket" diff --git a/spec/unit/json_compat_spec.rb b/spec/unit/json_compat_spec.rb index 38c2c60b2e..c3c017dabb 100644 --- a/spec/unit/json_compat_spec.rb +++ b/spec/unit/json_compat_spec.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require File.expand_path("../../spec_helper", __FILE__) +require_relative "../spec_helper" require "chef/json_compat" describe Chef::JSONCompat do diff --git a/spec/unit/resource_reporter_spec.rb b/spec/unit/resource_reporter_spec.rb index 1d7fd7fc79..775b14ef19 100644 --- a/spec/unit/resource_reporter_spec.rb +++ b/spec/unit/resource_reporter_spec.rb @@ -19,7 +19,7 @@ # limitations under the License. # -require File.expand_path("../../spec_helper", __FILE__) +require_relative "../spec_helper" require "chef/resource_reporter" require "socket" diff --git a/spec/unit/run_lock_spec.rb b/spec/unit/run_lock_spec.rb index 350a0b2c66..1c185e1603 100644 --- a/spec/unit/run_lock_spec.rb +++ b/spec/unit/run_lock_spec.rb @@ -15,7 +15,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -require File.expand_path("../../spec_helper", __FILE__) +require_relative "../spec_helper" require "chef/client" describe Chef::RunLock do diff --git a/spec/unit/scan_access_control_spec.rb b/spec/unit/scan_access_control_spec.rb index ec3c088b48..fda3534407 100644 --- a/spec/unit/scan_access_control_spec.rb +++ b/spec/unit/scan_access_control_spec.rb @@ -15,7 +15,7 @@ # limitations under the License. # -require File.expand_path("../../spec_helper", __FILE__) +require_relative "../spec_helper" require "chef/scan_access_control" describe Chef::ScanAccessControl do -- cgit v1.2.1