From 3a0154d88e60a7761bbbf2993277ff5bdb2590af Mon Sep 17 00:00:00 2001 From: Thomas Sawyer Date: Sun, 29 Nov 2026 17:18:02 -0500 Subject: [PATCH] Use QED's clear_working_directory! in the demo setup The setup cleared the directory by hand while the helper was broken. QED 3.0.2 fixes it, so that is now the least version asked for. Co-Authored-By: Claude Fable 5.2 --- demo/applique/setup.rb | 12 +++--------- ratch.gemspec | 2 +- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/demo/applique/setup.rb b/demo/applique/setup.rb index 9773de2..acf4b9a 100644 --- a/demo/applique/setup.rb +++ b/demo/applique/setup.rb @@ -1,17 +1,11 @@ -require 'tmpdir' require 'ae' require 'fileutils' require 'pathname' -# Each demonstration starts in an empty directory. QED runs them in a -# temporary directory of its own (tmp/qed), which is checked before -# anything is removed. +# Each demonstration starts in an empty directory: QED's temporary +# one (tmp/qed), where the demonstrations are run. Before :demo do - here = Dir.pwd - unless here.split('/').include?('qed') || here.start_with?(Dir.tmpdir) - abort "Not in QED's temporary directory: #{here}" - end - Dir.children(here).each{ |entry| FileUtils.rm_rf(File.join(here, entry)) } + clear_working_directory! end When "consisting of the following entries" do |text| diff --git a/ratch.gemspec b/ratch.gemspec index 22c613e..cd6eefa 100644 --- a/ratch.gemspec +++ b/ratch.gemspec @@ -44,6 +44,6 @@ Gem::Specification.new do |s| s.add_development_dependency 'rubytest', '>= 0.11.1' s.add_development_dependency 'spectrum', '>= 0.2' s.add_development_dependency 'assay', '>= 0.5.1' - s.add_development_dependency 'qed', '>= 3.0' + s.add_development_dependency 'qed', '>= 3.0.2' s.add_development_dependency 'ae', '>= 1.9' end