Add Rakefile to run all tests

Stephen Paul Weber created

Change summary

Rakefile | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)

Detailed changes

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