This repository has been archived by the owner on Aug 1, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathRakefile
55 lines (44 loc) · 1.51 KB
/
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
47
48
49
50
51
52
53
54
55
require 'bundler/gem_tasks'
require 'cucumber'
require 'cucumber/rake/task'
require 'rspec/core/rake_task'
require 'yard'
require_relative 'lib/tailor/rake_task'
Tailor::RakeTask.new do |task|
task.formatters = %w[yaml]
task.tailor_opts = %w[--output-file=output.yml]
end
#------------------------------------------------------------------------------
# spec
#------------------------------------------------------------------------------
RSpec::Core::RakeTask.new
namespace :spec do
desc 'Run specs with Ruby warnings turned on'
RSpec::Core::RakeTask.new(:warn) do |t|
t.ruby_opts = %w(-w)
end
desc 'Run unit tests'
RSpec::Core::RakeTask.new(:unit) do |t|
t.pattern = './spec/unit/**/*_spec.rb'
end
desc 'Run functional tests'
RSpec::Core::RakeTask.new(:functional) do |t|
t.pattern = './spec/functional/**/*_spec.rb'
end
end
#------------------------------------------------------------------------------
# features
#------------------------------------------------------------------------------
Cucumber::Rake::Task.new(:features) do |t|
t.cucumber_opts = %w(--format progress features --tags ~@wip)
end
#------------------------------------------------------------------------------
# yard
#------------------------------------------------------------------------------
YARD::Rake::YardocTask.new do |t|
t.files = %w(lib/**/*.rb - History.md)
t.options = %w(--private --protected --verbose)
end
desc 'Run RSpec examples and Cucumber features'
task test: [:spec, :features]
task default: [:test]