-
-
Notifications
You must be signed in to change notification settings - Fork 90
/
Rakefile
42 lines (33 loc) · 849 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
# frozen_string_literal: true
require "rake/testtask"
require "rspec/core/rake_task"
begin
require "rubocop/rake_task"
RuboCop::RakeTask.new
RuboCop::RakeTask.new("rubocop:md") do |task|
task.options << %w[-c .rubocop-md.yml]
end
rescue LoadError
task(:rubocop) {}
task("rubocop:md") {}
end
RSpec::Core::RakeTask.new(:spec)
Rake::TestTask.new(:test) do |t|
t.libs << "test"
t.libs << "lib"
t.test_files = FileList["test/**/*_test.rb"]
t.warning = false
end
namespace :test do
task :isolated do
Dir.glob("test/**/*_test.rb").all? do |file|
sh(Gem.ruby, "-I#{__dir__}/lib:#{__dir__}/test", file)
end || raise("Failures")
end
task ci: %w[test:isolated spec]
end
desc "Run Ruby Next nextify"
task :nextify do
sh "bundle exec ruby-next nextify -V"
end
task default: %w[rubocop rubocop:md test spec]