From dc2ef2ed771844bf65e124fd3f7dcc0bfaea4f61 Mon Sep 17 00:00:00 2001 From: Christophe De La Fuente Date: Thu, 22 Jan 2026 19:02:24 +0100 Subject: [PATCH] Update specs after code review --- .../ui/console/command_dispatcher/db_spec.rb | 23 ++++++++----------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/spec/lib/msf/ui/console/command_dispatcher/db_spec.rb b/spec/lib/msf/ui/console/command_dispatcher/db_spec.rb index 31b93c3c42..e1077d28ce 100644 --- a/spec/lib/msf/ui/console/command_dispatcher/db_spec.rb +++ b/spec/lib/msf/ui/console/command_dispatcher/db_spec.rb @@ -240,24 +240,21 @@ RSpec.describe Msf::Ui::Console::CommandDispatcher::Db do RSpec::Expectations.configuration.max_formatted_output_length = nil db.cmd_services - expect(@output).to match_array [ - "Services", - "========", - "", - "host port proto name state info resource parents", - "---- ---- ----- ---- ----- ---- -------- -------", - "192.168.0.1 1024 udp service3 open {\"base_url\":\"/service3\"}", - "192.168.0.1 1024 udp service1 open {\"base_url\":\"/service1\"} service2 (1024/udp)", - "192.168.0.1 1024 udp service2 open {\"base_url\":\"/service2\"} service3 (1024/udp)" - ] + expect(@output.join("\n")).to match_table <<~TABLE + Services + ======== + + host port proto name state info resource parents + ---- ---- ----- ---- ----- ---- -------- ------- + 192.168.0.1 1024 udp service3 open {"base_url":"/service3"} + 192.168.0.1 1024 udp service1 open {"base_url":"/service1"} service2 (1024/udp) + 192.168.0.1 1024 udp service2 open {"base_url":"/service2"} service3 (1024/udp) + TABLE ensure RSpec::Expectations.configuration.max_formatted_output_length = orig end end - context "with some services" do - end - describe "-h" do it "should show a help message" do db.cmd_services "-h"