forked from elvanja/jenkins-gitlab-hook-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
30 lines (25 loc) · 732 Bytes
/
Rakefile
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
require 'rake'
require 'rspec/core/rake_task'
if RUBY_PLATFORM == 'java'
task :default => :rspec
else
task :default => :acceptance
end
desc "Run all RSpec code examples"
RSpec::Core::RakeTask.new(:rspec) do |t|
t.pattern = "spec/*/**/*_spec.rb"
end
SPEC_SUITES = (Dir.entries('spec') - ['.', '..','fixtures']).select {|e| File.directory? "spec/#{e}" }
namespace :rspec do
SPEC_SUITES.each do |suite|
desc "Run #{suite} RSpec code examples"
RSpec::Core::RakeTask.new(suite) do |t|
t.pattern = "spec/#{suite}/**/*_spec.rb"
end
end
end
desc "Run acceptance tests"
RSpec::Core::RakeTask.new(:acceptance) do |t|
t.pattern = "spec/acceptance_spec.rb"
t.rspec_opts = "--order default --format doc"
end