We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 09619ab commit 4098979Copy full SHA for 4098979
spec/lib/rex/post/meterpreter/ui/console.rb
@@ -0,0 +1,27 @@
1
+# -*- coding:binary -*-
2
+require 'spec_helper'
3
+
4
+require 'rex/post/meterpreter/ui/console'
5
6
+describe Rex::Post::Meterpreter::Ui::Console do
7
8
+ subject(:console) do
9
+ Rex::Post::Meterpreter::Ui::Console.new(nil)
10
+ end
11
12
+ describe "#run_command" do
13
+ let(:dispatcher) do
14
+ double
15
16
17
+ it "logs error when Rex::AddressInUse is raised" do
18
+ allow(dispatcher).to receive(:cmd_address_in_use) do
19
+ raise Rex::AddressInUse, "0.0.0.0:80"
20
21
22
+ expect(subject).to receive(:log_error).with("The address is already in use (0.0.0.0:80).")
23
+ subject.run_command(dispatcher, "address_in_use", nil)
24
25
26
27
+end
0 commit comments