This repository was archived by the owner on Nov 29, 2023. It is now read-only.
forked from cloudfoundry-community-attic/bosh-bootstrap
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRakefile
More file actions
49 lines (39 loc) · 1.34 KB
/
Rakefile
File metadata and controls
49 lines (39 loc) · 1.34 KB
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
39
40
41
42
43
44
45
46
47
48
49
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __FILE__)
require "rubygems"
require "bundler"
Bundler.setup(:default, :test, :development)
require "bundler/gem_tasks"
require "rake/dsl_definition"
require "rake"
require "rspec/core/rake_task"
if defined?(RSpec)
namespace :spec do
desc "Run Unit Tests"
unit_rspec_task = RSpec::Core::RakeTask.new(:unit) do |t|
t.pattern = "spec/unit/**/*_spec.rb"
t.rspec_opts = %w(--format progress --color)
end
namespace :integration do
namespace :aws do
jobs = Dir["spec/integration/aws/*_spec.rb"].map {|f| File.basename(f).gsub(/aws_(.*)_spec.rb/, '\1')}
jobs.each do |job|
desc "Run AWS '#{job}' Integration Test"
RSpec::Core::RakeTask.new(job.to_sym) do |t|
t.pattern = "spec/integration/aws/aws_#{job}_spec.rb"
t.rspec_opts = %w(--format progress --color)
end
end
end
desc "Run AWS Integration Tests"
RSpec::Core::RakeTask.new(:aws) do |t|
t.pattern = "spec/integration/aws/*_spec.rb"
t.rspec_opts = %w(--format progress --color)
end
end
desc "Run all Integration Tests"
task :integration => %w[spec:integration:aws]
end
desc "Install dependencies and run tests"
task :spec => %w(spec:unit spec:integration)
end
task :default => :spec