summaryrefslogtreecommitdiff
path: root/spec/unit/recipe_spec.rb
diff options
context:
space:
mode:
authorTim Smith <tsmith84@gmail.com>2020-09-08 23:57:36 -0700
committerTim Smith <tsmith84@gmail.com>2020-09-09 15:01:13 -0700
commitbd6f49e04f56729853f54f2d2d94356edc2c6e8c (patch)
treeb5dafed28e255c193c3b2996ccd7f52b88054801 /spec/unit/recipe_spec.rb
parentb6c2173bf578a8f1b44aeea2bc5eef9288e48964 (diff)
downloadchef-bd6f49e04f56729853f54f2d2d94356edc2c6e8c.tar.gz
Use __dir__ instead of getting the dir of __FILE__
This is a bit easier to read Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'spec/unit/recipe_spec.rb')
-rw-r--r--spec/unit/recipe_spec.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/unit/recipe_spec.rb b/spec/unit/recipe_spec.rb
index 9df46b46e2..ffa7025e3f 100644
--- a/spec/unit/recipe_spec.rb
+++ b/spec/unit/recipe_spec.rb
@@ -25,7 +25,7 @@ require "chef/platform/resource_priority_map"
describe Chef::Recipe do
let(:cookbook_collection) do
- cookbook_repo = File.expand_path(File.join(File.dirname(__FILE__), "..", "data", "cookbooks"))
+ cookbook_repo = File.expand_path(File.join(__dir__, "..", "data", "cookbooks"))
cookbook_loader = Chef::CookbookLoader.new(cookbook_repo)
cookbook_loader.load_cookbooks
Chef::CookbookCollection.new(cookbook_loader)