diff --git a/spec/unit/recipes/agent_spec.rb b/spec/unit/recipes/agent_spec.rb index 14135fa82f51873d72667d1dad8d491aee6b7b42..04ccd237e4e8ed9eab1f03f5113984197175c426 100644 --- a/spec/unit/recipes/agent_spec.rb +++ b/spec/unit/recipes/agent_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' require 'json' describe 'ossec::agent' do - let(:data_bags_path) { File.expand_path('../../../../test/fixtures/data_bags', __FILE__) } + let(:data_bags_path) { File.expand_path('../../../test/fixtures/data_bags', __dir__) } let(:data_bag_ossec_ssh) { JSON.parse(File.read("#{data_bags_path}/ossec/ssh.json")) } cached(:chef_run) do diff --git a/spec/unit/recipes/client_spec.rb b/spec/unit/recipes/client_spec.rb index 55721652c15798255545172177117bc746a6a58b..bd577ddda2e2f3192b3c87946efde8bbae650958 100644 --- a/spec/unit/recipes/client_spec.rb +++ b/spec/unit/recipes/client_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' require 'json' describe 'ossec::client' do - let(:data_bags_path) { File.expand_path('../../../../test/fixtures/data_bags', __FILE__) } + let(:data_bags_path) { File.expand_path('../../../test/fixtures/data_bags', __dir__) } let(:data_bag_ossec_ssh) { JSON.parse(File.read("#{data_bags_path}/ossec/ssh.json")) } cached(:chef_run) do diff --git a/spec/unit/recipes/server_spec.rb b/spec/unit/recipes/server_spec.rb index b4becd4017f037b9d3a88c2bd7d3b92b948aa724..d33a6f3282b111a87dc8f4777ce6e88dc71206d5 100644 --- a/spec/unit/recipes/server_spec.rb +++ b/spec/unit/recipes/server_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' require 'json' describe 'ossec::server' do - let(:data_bags_path) { File.expand_path('../../../../test/fixtures/data_bags', __FILE__) } + let(:data_bags_path) { File.expand_path('../../../test/fixtures/data_bags', __dir__) } let(:data_bag_ossec_ssh) { JSON.parse(File.read("#{data_bags_path}/ossec/ssh.json")) } cached(:chef_run) do