namarara/Rakefile

29 lines
720 B
Text
Raw Normal View History

2017-09-12 13:32:50 +00:00
require "bundler/gem_tasks"
require "rake/testtask"
2017-09-12 13:35:14 +00:00
require 'rubocop/rake_task'
2017-09-04 09:19:29 +00:00
2017-09-12 13:35:14 +00:00
# Add additional test suite definitions to the default test task here
namespace :spec do
desc 'Runs RuboCop on specified directories'
RuboCop::RakeTask.new(:rubocop) do |task|
# Dirs: app, lib, test
task.patterns = ['exe/**/*.rb', 'lib/**/*.rb', 'spec/**/*_spec.rb']
# Make it easier to disable cops.
task.options << "--display-cop-names"
# Abort on failures (fix your code first)
task.fail_on_error = true
end
end
Rake::TestTask.new(:spec) do |t|
t.libs << "spec"
2017-09-12 13:32:50 +00:00
t.libs << "lib"
2017-09-12 13:35:14 +00:00
t.test_files = FileList['spec/**/*_spec.rb']
2017-09-12 13:32:50 +00:00
end
2017-09-04 09:19:29 +00:00
2017-09-12 13:35:14 +00:00
# Rake::Task[:spec].enhance ['spec:rubocop']
task :default => :spec