-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRakefile
More file actions
47 lines (40 loc) · 854 Bytes
/
Copy pathRakefile
File metadata and controls
47 lines (40 loc) · 854 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
39
40
41
42
43
44
45
46
47
# frozen_string_literal: true
require "rake/testtask"
require "standard/rake"
#
# Test tasks
#
desc "Run all tests"
Rake::TestTask.new(:test) do |t|
t.libs << "test"
t.libs << "lib"
t.test_files = FileList["test/**/*_test.rb"]
end
desc "Run unit tests only"
Rake::TestTask.new("test:unit") do |t|
t.libs << "test"
t.libs << "lib"
t.test_files = FileList["test/unit/**/*_test.rb"]
end
desc "Run integration tests only"
Rake::TestTask.new("test:integration") do |t|
t.libs << "test"
t.libs << "lib"
t.test_files = FileList["test/integration/**/*_test.rb"]
end
#
# Lint tasks
#
desc "Run StandardRB linter"
task :lint do
sh "bundle exec standardrb"
end
desc "Run StandardRB linter and auto-fix"
task "lint:fix" do
sh "bundle exec standardrb --fix"
end
#
# Default task
#
desc "Run tests and linter"
task default: [:test, :lint]