summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith84@gmail.com>2020-02-18 22:35:17 -0800
committerTim Smith <tsmith84@gmail.com>2020-02-18 22:38:38 -0800
commit677b8361870f54978c935ed94fd413ccff230aea (patch)
tree9a6d9063fb8854a162d932bb8cd133d72d43e760
parentc9414338729decf217c8bfc37b1d405619c44331 (diff)
downloadchef-require_relative.tar.gz
Use require_relative within the specsrequire_relative
Simplify how we include the spec_helper via the new cookstyle rule. Signed-off-by: Tim Smith <tsmith@chef.io>
-rw-r--r--spec/functional/run_lock_spec.rb2
-rw-r--r--spec/functional/util/powershell/cmdlet_spec.rb2
-rw-r--r--spec/functional/version_spec.rb2
-rw-r--r--spec/unit/data_collector_spec.rb2
-rw-r--r--spec/unit/json_compat_spec.rb2
-rw-r--r--spec/unit/resource_reporter_spec.rb2
-rw-r--r--spec/unit/run_lock_spec.rb2
-rw-r--r--spec/unit/scan_access_control_spec.rb2
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