Skip to content

Commit

Permalink
Take advantage of Rake task improvements to speed things up and combi…
Browse files Browse the repository at this point in the history
…ne the suites
  • Loading branch information
searls committed Sep 29, 2023
1 parent f280bb5 commit 0d71fca
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
9 changes: 7 additions & 2 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
2 changes: 2 additions & 0 deletions safe/helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

require "fileutils"
class SafeTest < TLDR
dont_run_these_in_parallel!

def setup
super
clean("db")
Expand Down

0 comments on commit 0d71fca

Please sign in to comment.