# frozen_string_literal: true require "rake/testtask" require "rubocop/rake_task" require "rspec/core/rake_task" RuboCop::RakeTask.new RSpec::Core::RakeTask.new(:spec) Rake::TestTask.new(:test) do |t| t.libs << "test" t.libs << "lib" t.test_files = FileList["test/**/*_test.rb"] end namespace :test do task :isolated do Dir.glob("test/**/*_test.rb").all? do |file| sh(Gem.ruby, "-w", "-Ilib:test", file) end || raise("Failures") end task ci: %w[rubocop test:isolated spec] end task default: [:rubocop, :test, :spec]