forked from exercism/ruby
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRakefile
More file actions
29 lines (22 loc) · 663 Bytes
/
Rakefile
File metadata and controls
29 lines (22 loc) · 663 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
require 'rake'
require 'rake/testtask'
require_relative 'lib/tasks/exercise_test_tasks'
task default: %i[test rubocop]
desc 'Run individual exercises or run all development and exercise tests'
task :test do
Rake::Task['test:dev'].invoke
Rake::Task['test:exercises'].invoke
end
desc 'Run Rubocop'
task :rubocop do
system('rubocop --display-cop-names')
end
namespace :test do
flags = ARGV.drop_while { |e| e != '--' }.drop(1).join(' ')
desc 'Run all development tests located in the test directory'
Rake::TestTask.new :dev do |task|
task.options = flags
task.pattern = 'test/**/*_test.rb'
end
ExerciseTestTasks.new options: flags
end