From 0d71fca0e79a4f500e1685f5dc6ac459885d1040 Mon Sep 17 00:00:00 2001 From: Justin Searls Date: Thu, 28 Sep 2023 20:37:49 -0400 Subject: [PATCH] Take advantage of Rake task improvements to speed things up and combine the suites --- Gemfile.lock | 2 +- Rakefile | 9 +++++++-- safe/helper.rb | 2 ++ 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index a7fe1b2..2d00f06 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -68,7 +68,7 @@ GEM attr_extras (>= 6.2.4) diff-lcs patience_diff - tldr (0.5.0) + tldr (0.6.0) concurrent-ruby (~> 1.2) super_diff (~> 0.10) unicode-display_width (2.4.2) diff --git a/Rakefile b/Rakefile index ca45d44..6233d49 100644 --- a/Rakefile +++ b/Rakefile @@ -3,14 +3,19 @@ require "rake/testtask" require "tldr/rake" TLDR::Task.new(:name => :unit) + TLDR::Task.new(:name => :safe, :config => TLDR::Config.new( :parallel => false, :load_paths => ["safe", "lib"], - :helper => "safe/helper.rb", + :helper_paths => ["safe/helper.rb"], :paths => FileList["safe/**/*_test.rb"] )) -task :test => [:unit, :safe] +TLDR::Task.new(:name => :test, :config => TLDR::Config.new( + :load_paths => ["safe", "test", "lib"], + :helper_paths => ["test/helper.rb", "safe/helper.rb"], + :paths => FileList["test/**/*_test.rb", "safe/**/*_test.rb"] +)) require "standard/rake" task :default => [:test, :"standard:fix"] diff --git a/safe/helper.rb b/safe/helper.rb index 123fcef..a11e1b0 100644 --- a/safe/helper.rb +++ b/safe/helper.rb @@ -3,6 +3,8 @@ require "fileutils" class SafeTest < TLDR + dont_run_these_in_parallel! + def setup super clean("db")