forked from octobox/octobox
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
30 lines (22 loc) · 841 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
# 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_relative 'config/application'
Rails.application.load_tasks
Rake::Task['assets:precompile'].enhance ['api_docs:generate']
task 'test:skip_visuals' => 'test:prepare' do
['channels', 'controllers', 'integration', 'helpers', 'lib', 'models',
'validators', 'workers'].each do |name|
$: << 'test'
Rails::TestUnit::Runner.rake_run(["test/#{name}"])
end
end
task 'test:visuals' => 'test:prepare' do
$: << "test"
Rails::TestUnit::Runner.rake_run(["test/visuals"])
end
task(:default).clear.enhance ['test:skip_visuals']
if %w[development test].include? Rails.env
require 'rubocop/rake_task'
RuboCop::RakeTask.new
task(:default).enhance %i[rubocop]
end