noozoid/Rakefile

29 lines
718 B
Text
Raw Normal View History

2019-12-29 11:59:14 +00:00
require "bundler/gem_tasks"
2019-12-29 21:39:50 +00:00
require "rake/testtask"
require 'rubocop/rake_task'
# 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"
t.libs << "lib"
t.test_files = FileList['spec/**/*_spec.rb']
end
Rake::Task[:spec].enhance ['spec:rubocop']
2019-12-29 11:59:14 +00:00
task :default => :spec