We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 32623e2 commit 1975b03Copy full SHA for 1975b03
cookbooks/aws-parallelcluster-shared/spec/spec_helper.rb
@@ -4,6 +4,19 @@
4
include Chef::Mixin::ShellOut
5
6
RSpec.configure do |c|
7
+ c.before(:suite) do
8
+ # Copy third-party cookbooks to cookbooks directory for ChefSpec tests
9
+ require 'fileutils'
10
+ third_party_path = File.expand_path('../../third-party', __dir__)
11
+ cookbooks_path = File.expand_path('../..', __dir__)
12
+ if Dir.exist?(third_party_path)
13
+ Dir.glob(File.join(third_party_path, '*')).each do |cookbook|
14
+ next unless File.directory?(cookbook)
15
+ FileUtils.cp_r(cookbook, cookbooks_path)
16
+ end
17
18
19
+
20
c.before(:each) do
21
allow(File).to receive(:exist?).and_call_original
22
allow(Dir).to receive(:exist?).and_call_original
0 commit comments