2013-07-18 17:56:21 +00:00
|
|
|
shared_context 'Msf::UIDriver' do
|
2013-09-30 18:47:53 +00:00
|
|
|
let(:driver) do
|
|
|
|
double(
|
|
|
|
'Driver',
|
|
|
|
:framework => framework
|
|
|
|
).tap { |driver|
|
|
|
|
driver.stub(:on_command_proc=).with(kind_of(Proc))
|
|
|
|
driver.stub(:print_line).with(kind_of(String)) do |string|
|
|
|
|
@output ||= []
|
|
|
|
@output.concat string.split("\n")
|
|
|
|
end
|
|
|
|
driver.stub(:print_error).with(kind_of(String)) do |string|
|
|
|
|
@error ||= []
|
|
|
|
@error.concat string.split("\n")
|
|
|
|
end
|
|
|
|
}
|
|
|
|
end
|
2013-07-22 21:26:45 +00:00
|
|
|
end
|