From 1f376492a7a5fc81343e885de8eddd41ca0c5a2e Mon Sep 17 00:00:00 2001 From: Stephen Paul Weber Date: Tue, 20 Apr 2021 10:46:28 -0500 Subject: [PATCH] Add Rakefile to run all tests --- Rakefile | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 Rakefile diff --git a/Rakefile b/Rakefile new file mode 100644 index 0000000..c779a20 --- /dev/null +++ b/Rakefile @@ -0,0 +1,22 @@ +# frozen_string_literal: true + +require "rake/testtask" +require "rubocop/rake_task" + +Rake::TestTask.new(:test) do |t| + ENV["RANTLY_VERBOSE"] = "0" unless ENV["RANTLY_VERBOSE"] + ENV["RANTLY_COUNT"] = "10" unless ENV["RANTLY_COUNT"] + + t.libs << "test" + t.libs << "lib" + t.test_files = FileList["test/**/test_*.rb"] + t.warning = false +end + +RuboCop::RakeTask.new(:lint) + +task :entr do + sh "sh", "-c", "git ls-files | entr -s 'rubocop && rake test'" +end + +task default: :test -- 2.34.2