-
Notifications
You must be signed in to change notification settings - Fork 277
/
Rakefile
48 lines (39 loc) · 920 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
47
48
# frozen_string_literal: true
require "bundler"
Bundler::GemHelper.install_tasks
require "rspec/core/rake_task"
RSpec::Core::RakeTask.new(:spec)
desc "Run RSpec tests"
task test: :spec
task default: :spec
module SteepRunner
def self.run(*command)
require "steep"
require "steep/cli"
Steep::CLI.new(argv: command, stdout: $stdout, stderr: $stderr, stdin: $stdin).run
end
end
desc "Check type information"
task steep: "steep:check"
namespace :steep do
desc "Check type information"
task :check do
SteepRunner.run("check")
end
desc "Print type statistics"
task :stats do
SteepRunner.run("stats", "--log-level=fatal")
end
end
namespace :rbs do
desc "Run RSpec tests with RBS enabled to test type signatures"
task :spec do
exec(
{
"RBS_TEST_TARGET" => "MetaTags::*",
"RUBYOPT" => "-rrbs/test/setup"
},
"bundle exec rspec"
)
end
end