diff options
author | Tim Smith <tsmith84@gmail.com> | 2020-07-07 15:31:02 -0700 |
---|---|---|
committer | Tim Smith <tsmith84@gmail.com> | 2020-07-07 17:30:49 -0700 |
commit | ed460911a49716817ded2986e81a5116dfbb795e (patch) | |
tree | 05939eafb0047711ff008e89fe84312fbfdc9531 /spec/integration | |
parent | 824d9da7173d0dff9bb2786dcf5584e53e9866eb (diff) | |
download | chef-ed460911a49716817ded2986e81a5116dfbb795e.tar.gz |
expand_path with __dir__ instead of __FILE__
It's easier to read this at a glance and understand what path we're trying to get.
Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'spec/integration')
-rw-r--r-- | spec/integration/recipes/accumulator_spec.rb | 2 | ||||
-rw-r--r-- | spec/integration/recipes/lwrp_inline_resources_spec.rb | 2 | ||||
-rw-r--r-- | spec/integration/recipes/lwrp_spec.rb | 2 | ||||
-rw-r--r-- | spec/integration/recipes/notifies_spec.rb | 2 | ||||
-rw-r--r-- | spec/integration/recipes/notifying_block_spec.rb | 2 | ||||
-rw-r--r-- | spec/integration/recipes/unified_mode_spec.rb | 2 | ||||
-rw-r--r-- | spec/integration/recipes/use_partial_spec.rb | 2 |
7 files changed, 7 insertions, 7 deletions
diff --git a/spec/integration/recipes/accumulator_spec.rb b/spec/integration/recipes/accumulator_spec.rb index e0ecfd340a..dc3724707e 100644 --- a/spec/integration/recipes/accumulator_spec.rb +++ b/spec/integration/recipes/accumulator_spec.rb @@ -6,7 +6,7 @@ describe "Accumulators" do include IntegrationSupport include Chef::Mixin::ShellOut - let(:chef_dir) { File.expand_path("../../../../bin", __FILE__) } + let(:chef_dir) { File.expand_path('../../../bin', __dir__) } # Invoke `chef-client` as `ruby PATH/TO/chef-client`. This ensures the # following constraints are satisfied: diff --git a/spec/integration/recipes/lwrp_inline_resources_spec.rb b/spec/integration/recipes/lwrp_inline_resources_spec.rb index 833f866db4..7de6f78656 100644 --- a/spec/integration/recipes/lwrp_inline_resources_spec.rb +++ b/spec/integration/recipes/lwrp_inline_resources_spec.rb @@ -6,7 +6,7 @@ describe "LWRPs with inline resources" do include IntegrationSupport include Chef::Mixin::ShellOut - let(:chef_dir) { File.expand_path("../../../../bin", __FILE__) } + let(:chef_dir) { File.expand_path('../../../bin', __dir__) } # Invoke `chef-client` as `ruby PATH/TO/chef-client`. This ensures the # following constraints are satisfied: diff --git a/spec/integration/recipes/lwrp_spec.rb b/spec/integration/recipes/lwrp_spec.rb index 1c772a378f..247ed9125d 100644 --- a/spec/integration/recipes/lwrp_spec.rb +++ b/spec/integration/recipes/lwrp_spec.rb @@ -6,7 +6,7 @@ describe "LWRPs" do include IntegrationSupport include Chef::Mixin::ShellOut - let(:chef_dir) { File.expand_path("../../../../bin", __FILE__) } + let(:chef_dir) { File.expand_path('../../../bin', __dir__) } # Invoke `chef-client` as `ruby PATH/TO/chef-client`. This ensures the # following constraints are satisfied: diff --git a/spec/integration/recipes/notifies_spec.rb b/spec/integration/recipes/notifies_spec.rb index f8bd9df8db..299fcd1912 100644 --- a/spec/integration/recipes/notifies_spec.rb +++ b/spec/integration/recipes/notifies_spec.rb @@ -22,7 +22,7 @@ describe "notifications" do include IntegrationSupport include Chef::Mixin::ShellOut - let(:chef_dir) { File.expand_path("../../../../bin", __FILE__) } + let(:chef_dir) { File.expand_path('../../../bin', __dir__) } let(:chef_client) { "bundle exec chef-client --minimal-ohai" } when_the_repository "notifies a nameless resource" do diff --git a/spec/integration/recipes/notifying_block_spec.rb b/spec/integration/recipes/notifying_block_spec.rb index 5f472cecaa..292fce4aac 100644 --- a/spec/integration/recipes/notifying_block_spec.rb +++ b/spec/integration/recipes/notifying_block_spec.rb @@ -23,7 +23,7 @@ describe "notifying_block" do include IntegrationSupport include Chef::Mixin::ShellOut - let(:chef_dir) { File.expand_path("../../../../bin", __FILE__) } + let(:chef_dir) { File.expand_path('../../../bin', __dir__) } let(:chef_client) { "bundle exec chef-client --minimal-ohai" } when_the_repository "notifying_block test one" do diff --git a/spec/integration/recipes/unified_mode_spec.rb b/spec/integration/recipes/unified_mode_spec.rb index bb8cffae3f..45efd7a08b 100644 --- a/spec/integration/recipes/unified_mode_spec.rb +++ b/spec/integration/recipes/unified_mode_spec.rb @@ -6,7 +6,7 @@ describe "Unified Mode" do include IntegrationSupport include Chef::Mixin::ShellOut - let(:chef_dir) { File.expand_path("../../../../bin", __FILE__) } + let(:chef_dir) { File.expand_path('../../../bin', __dir__) } let(:chef_client) { "bundle exec chef-client --minimal-ohai" } diff --git a/spec/integration/recipes/use_partial_spec.rb b/spec/integration/recipes/use_partial_spec.rb index 32c1dd4a2d..9287a1ad1c 100644 --- a/spec/integration/recipes/use_partial_spec.rb +++ b/spec/integration/recipes/use_partial_spec.rb @@ -22,7 +22,7 @@ describe "notifying_block" do include IntegrationSupport include Chef::Mixin::ShellOut - let(:chef_dir) { File.expand_path("../../../../bin", __FILE__) } + let(:chef_dir) { File.expand_path('../../../bin', __dir__) } let(:chef_client) { "bundle exec chef-client --minimal-ohai" } when_the_repository "has a cookbook with partial resources" do |