-
Notifications
You must be signed in to change notification settings - Fork 1
/
Rakefile
35 lines (26 loc) · 1.06 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
# Add your own tasks in files placed in lib/tasks ending in .rake,
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
require File.expand_path('config/application', __dir__)
MrtDashboard::Application.load_tasks
# ------------------------------------------------------------
# Coverage & profiling
desc 'Run all tests with coverage'
task :coverage do
ENV['COVERAGE'] = 'true'
Rake::Task[:spec].invoke
end
desc 'Run all tests with profiling (for full ruby-prof report, specify [calltree] or [html] format)'
task :profile, [:format] do |_, args|
ENV['PROFILE'] = args.to_h.inspect
Rake::Task[:spec].invoke
end
# ------------------------------------------------------------
# RuboCop
require 'rubocop/rake_task'
RuboCop::RakeTask.new
# ------------------------------------------------------------
# Defaults
# clear rspec/rails default :spec task in favor of :coverage
Rake::Task[:default].clear if Rake::Task.task_defined?(:default)
desc 'Run unit tests, check test coverage, check code style'
task default: %i[coverage rubocop]