diff --git a/.ruby-version b/.ruby-version new file mode 100644 index 0000000..197c4d5 --- /dev/null +++ b/.ruby-version @@ -0,0 +1 @@ +2.4.0 diff --git a/Rakefile b/Rakefile index 5e63157..4df50bb 100644 --- a/Rakefile +++ b/Rakefile @@ -10,3 +10,20 @@ namespace :gem do system 'gem build trollolo.gemspec' end end + +require 'rubocop/rake_task' +require 'rspec/core/rake_task' + +task default: %i[rubocop spec] + +desc 'Run tests' +task :spec do + RSpec::Core::RakeTask.new +end + +desc 'Run rubocop' +task :rubocop do + RuboCop::RakeTask.new do |t| + t.options = ['--display-cop-names'] + end +end