https://github.com/socketry/console/commit/01438b0390ccd0beead0a6ca828a8dd5ffc710b9
https://github.com/socketry/console/commit/c2121ed574d846361fcc0cfde97f88ad841a306c

From 01438b0390ccd0beead0a6ca828a8dd5ffc710b9 Mon Sep 17 00:00:00 2001
From: Samuel Williams <samuel.williams@oriontransfer.co.nz>
Date: Fri, 24 Feb 2023 09:28:43 +1300
Subject: [PATCH] Add log level tests.

--- a/test/console.rb
+++ b/test/console.rb
@@ -10,7 +10,7 @@
 
 describe Console do
 	it "has a version number" do
-		expect(Console::VERSION).not.to be nil
+		expect(Console::VERSION).to be =~ /\d+\.\d+\.\d+/
 	end
 	
 	with MyModule do
--- a/test/console/compatible/logger.rb
+++ b/test/console/compatible/logger.rb
@@ -37,4 +37,9 @@
 		
 		expect(io.string).to be(:include?, "Hello World")
 	end
+	
+	it "has a default log level" do
+		expect(logger.level).to be_a(Integer)
+		expect(logger.level).to be == ::Logger::DEBUG
+	end
 end

From c2121ed574d846361fcc0cfde97f88ad841a306c Mon Sep 17 00:00:00 2001
From: Samuel Williams <samuel.williams@oriontransfer.co.nz>
Date: Fri, 24 Feb 2023 18:26:17 +1300
Subject: [PATCH] Fix tests when run interactively and incrementally.

--- a/lib/console/terminal/logger.rb
+++ b/lib/console/terminal/logger.rb
@@ -6,6 +6,7 @@
 
 require_relative '../buffer'
 require_relative '../event'
+require_relative '../clock'
 
 require_relative 'text'
 require_relative 'xterm'
--- a/test/console/capture.rb
+++ b/test/console/capture.rb
@@ -4,6 +4,7 @@
 # Copyright, 2020-2022, by Samuel Williams.
 
 require 'console/capture'
+require 'console/logger'
 
 describe Console::Capture do
 	let(:capture) {subject.new}
--- a/test/console/compatible/logger.rb
+++ b/test/console/compatible/logger.rb
@@ -4,6 +4,7 @@
 # Copyright, 2022, by Samuel Williams.
 
 require 'console/compatible/logger'
+require 'console/terminal/logger'
 
 describe Console::Compatible::Logger do
 	let(:io) {StringIO.new}
--- a/test/console/logger.rb
+++ b/test/console/logger.rb
@@ -70,15 +70,6 @@
 		end
 	end
 	
-	Console::Logger::LEVELS.each do |name, level|
-		it "can log #{name} messages" do
-			expect(output).to receive(:call).with(message, severity: name)
-			
-			logger.level = level
-			logger.send(name, message)
-		end
-	end
-	
 	with '#enable' do
 		let(:object) {Object.new}
 		
@@ -94,23 +85,34 @@
 	end
 	
 	Console::Logger::LEVELS.each do |name, level|
-		with '#off!', unique: name do
-			it "doesn't log #{name} messages" do
-				logger.off!
+		with "log level #{name}", unique: name do
+			with "#send" do
+				it "can log #{name} messages" do
+					expect(output).to receive(:call).with(message, severity: name)
 				
-				expect(output).not.to receive(:call)
-				logger.send(name, message)
-				expect(logger.send("#{name}?")).to be == false
+					logger.level = level
+					logger.send(name, message)
+				end
 			end
-		end
-		
-		with '#all!', unique: name do
-			it "can log #{name} messages" do
-				logger.all!
-				
-				expect(output).to receive(:call).with(message, severity: name)
-				logger.send(name, message)
-				expect(logger.send("#{name}?")).to be == true
+			
+			with '#off!' do
+				it "doesn't log #{name} messages" do
+					logger.off!
+					
+					expect(output).not.to receive(:call)
+					logger.send(name, message)
+					expect(logger.send("#{name}?")).to be == false
+				end
+			end
+			
+			with '#all!' do
+				it "can log #{name} messages" do
+					logger.all!
+					
+					expect(output).to receive(:call).with(message, severity: name)
+					logger.send(name, message)
+					expect(logger.send("#{name}?")).to be == true
+				end
 			end
 		end
 	end
--- a/test/console/resolver.rb
+++ b/test/console/resolver.rb
@@ -4,6 +4,7 @@
 # Copyright, 2019-2022, by Samuel Williams.
 # Copyright, 2021, by Robert Schulze.
 
+require 'console'
 require 'console/resolver'
 require 'resolver_classes'
 
--- a/test/console/serialized/logger.rb
+++ b/test/console/serialized/logger.rb
@@ -4,6 +4,7 @@
 # Copyright, 2019-2022, by Samuel Williams.
 
 require 'console/serialized/logger'
+require 'console/event/spawn'
 
 describe Console::Serialized::Logger do
 	let(:io) {StringIO.new}
