-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
46 lines (34 loc) · 910 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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# encoding: UTF-8
require 'rubygems'
require 'bundler/setup'
require 'bundler/cli'
require 'bundler/gem_tasks'
require 'rake/testtask'
require 'rake/notes/rake_task'
require 'rspec/core/rake_task'
RSpec::Core::RakeTask.new(:test)
namespace :test do
desc 'Run unit tests'
RSpec::Core::RakeTask.new(:unit) do |t|
t.pattern = 'spec/unit/**/*.rb'
end
desc 'Run integration tests'
RSpec::Core::RakeTask.new(:integration) do |t|
t.pattern = 'spec/integration/**/*.rb'
end
desc 'Run legacy tests'
RSpec::Core::RakeTask.new(:legacy) do |t|
t.pattern = 'test/**/test_*.rb'
end
desc 'Run coding style tests'
RSpec::Core::RakeTask.new(:cop) do
Rake::Task['cop'].invoke
end
task :all => [:unit, :integration, :cop]
end
desc 'Run all tests'
task :test => 'test:all'
task :usage do
puts 'No rake task specified, use rake -T to list them'
end
task :default => [:usage]