diff --git a/fixtures/console/captured_output.rb b/fixtures/console/captured_output.rb index f22a4ba..b5a4276 100644 --- a/fixtures/console/captured_output.rb +++ b/fixtures/console/captured_output.rb @@ -4,11 +4,13 @@ # Copyright, 2024, by Samuel Williams. require 'sus/shared' +require 'console/capture' +require 'console/logger' module Console CapturedOutput = Sus::Shared("captured output") do let(:capture) {Console::Capture.new} - let(:logger) {Console::Logger.new(capture)} + let(:logger) {Console::Logger.new(capture, level: Console::Logger::DEBUG)} def around Fiber.new do diff --git a/test/console.rb b/test/console.rb index 58fdd25..855e88a 100644 --- a/test/console.rb +++ b/test/console.rb @@ -6,7 +6,7 @@ # Copyright, 2020, by Michael Adams. require 'console' -require 'console/capture' +require 'console/captured_output' describe Console do it "has a version number" do @@ -20,15 +20,7 @@ end with 'an isolated logger' do - let(:capture) {Console::Capture.new} - let(:logger) {Console::Logger.new(capture, level: Console::Logger::DEBUG)} - - def around - Fiber.new do - Console.logger = logger - super - end.resume - end + include_context Console::CapturedOutput it "can invoke interface methods for all log levels" do Console::Logger::LEVELS.each do |name, level|