Skip to content

Commit 97adb2a

Browse files
committed
Move get_stdout inside 'describe Msfcli' statement
1 parent f274a96 commit 97adb2a

File tree

1 file changed

+13
-12
lines changed

1 file changed

+13
-12
lines changed

spec/msfcli_spec.rb

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,21 @@
88
require 'msf/base'
99

1010

11-
# Get stdout:
12-
# http://stackoverflow.com/questions/11349270/test-output-to-command-line-with-rspec
13-
def get_stdout(&block)
14-
out = $stdout
15-
$stdout = fake = StringIO.new
16-
begin
17-
yield
18-
ensure
19-
$stdout = out
11+
describe Msfcli do
12+
13+
# Get stdout:
14+
# http://stackoverflow.com/questions/11349270/test-output-to-command-line-with-rspec
15+
def get_stdout(&block)
16+
out = $stdout
17+
$stdout = fake = StringIO.new
18+
begin
19+
yield
20+
ensure
21+
$stdout = out
22+
end
23+
fake.string
2024
end
21-
fake.string
22-
end
2325

24-
describe Msfcli do
2526
context "Class methods" do
2627

2728
context ".usage" do

0 commit comments

Comments
 (0)