From 33289625df756d316041d94ada0a6606d5d3371c Mon Sep 17 00:00:00 2001 From: Thomas Sawyer Date: Mon, 28 Sep 2026 22:19:04 -0400 Subject: [PATCH] Use bundled Rubytest CLI from lemons test --- HISTORY.md | 5 +++++ README.md | 2 +- lemon.gemspec | 2 +- lib/lemon/cli.rb | 10 ++-------- 4 files changed, 9 insertions(+), 10 deletions(-) diff --git a/HISTORY.md b/HISTORY.md index d90ecbb..b74a57d 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,5 +1,10 @@ # RELEASE HISTORY +## Unreleased + +* Route `lemons test` through Rubytest's bundled CLI and require Rubytest 0.9+. +* Use the built-in TAP format in the README example. + ## 0.9.3 / 2026-04-01 Bug fix release. Fixes Ruby 3+ compatibility issues in test method dispatch. diff --git a/README.md b/README.md index db984ae..dd2b7a4 100644 --- a/README.md +++ b/README.md @@ -77,7 +77,7 @@ Lemon utilizes the RubyTest universal test harness to run tests, the `lemons tes Normal output is typically a _dot progression_. Other output types can be specified by the `--format` or `-f` option. - $ rubytest -r lemon -f tapy test/cases/name_case.rb + $ rubytest -r lemon -f tap test/cases/name_case.rb See [RubyTest](https://github.com/rubyworks/rubytest) for more information. diff --git a/lemon.gemspec b/lemon.gemspec index 3862795..1c76e4e 100644 --- a/lemon.gemspec +++ b/lemon.gemspec @@ -18,7 +18,7 @@ Gem::Specification.new do |s| s.executables = ['lemons'] s.require_paths = ['lib'] - s.add_dependency 'rubytest', '>= 0.8' + s.add_dependency 'rubytest', '>= 0.9' s.add_dependency 'ae', '>= 1.8' s.add_dependency 'ansi', '>= 1.5' diff --git a/lib/lemon/cli.rb b/lib/lemon/cli.rb index 708f26e..bc6e642 100644 --- a/lib/lemon/cli.rb +++ b/lib/lemon/cli.rb @@ -1,4 +1,3 @@ -#require 'lemon/cli/runner' require 'lemon/cli/generate' require 'lemon/cli/scaffold' require 'lemon/cli/coverage' @@ -11,10 +10,6 @@ module Lemon module CLI end - #-- - # TODO: Use Lemon::CLI::Runner and have it delegate to RubyTest ? - #++ - # Command line interface takes the first argument off `argv` to determine # the subcommand: `test`, `cov` or `gen`. If `test`, then Lemon delegates # control to Ruby Test. @@ -24,9 +19,8 @@ def self.cli(*argv) case cmd when 't', 'test', 'run' require 'lemon' - require 'rubytest' - Test::Runner.cli(*ARGV) - #Lemon::CLI::Test.new.run(argv) + require 'rubytest/cli' + Test::CLI.run(argv) when 'g', 'gen', 'generate', 'generator' Lemon::CLI::Generate.run(argv) when 's', 'sca', 'scaffold'