-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathRakefile
More file actions
38 lines (32 loc) · 839 Bytes
/
Rakefile
File metadata and controls
38 lines (32 loc) · 839 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/usr/bin/env rake
require 'rake'
require 'rspec/core/rake_task'
begin
require 'emeril/rake'
rescue LoadError
puts '>>>>> Emeril gem not loaded, omitting tasks' unless ENV['CI']
end
task spec: 'spec:all'
task default: :spec
namespace :spec do
targets = []
Dir.glob('./test/integration/default/*').each do |dir|
next unless File.directory?(dir)
targets << File.basename(dir)
end
task all: targets
task default: :all
targets.each do |target|
desc "Run serverspec tests to #{target}"
RSpec::Core::RakeTask.new(target.to_sym) do |t|
ENV['TARGET_HOST'] = target
t.pattern = "test/integration/default/#{target}/*_spec.rb"
end
end
end
begin
require 'kitchen/rake_tasks'
Kitchen::RakeTasks.new
rescue LoadError
puts '>>>>> Kitchen gem not loaded, omitting tasks' unless ENV['CI']
end