Add spec for Msf::EncodedPayload.create.

bug/bundler_fix
Joe Vennix 2014-08-24 02:36:09 -05:00
parent 6313b29b7a
commit 120f416f9c
No known key found for this signature in database
GPG Key ID: 127B05FB3E85A2B0
1 changed files with 19 additions and 0 deletions

View File

@ -16,6 +16,25 @@ describe Msf::EncodedPayload do
described_class.new(framework, pinst, {}) described_class.new(framework, pinst, {})
end end
describe '.create' do
context 'when passed a valid payload instance' do
subject(:created_payload) do
described_class.create(pinst)
end
# don't ever actually generate payload bytes
before { Msf::EncodedPayload.any_instance.stub(:generate) }
it 'returns an Msf::EncodedPayload instance' do
expect(created_payload).to be_an(Msf::EncodedPayload)
end
end
end
describe '#arch' do describe '#arch' do
context 'when payload is linux/x86 reverse tcp' do context 'when payload is linux/x86 reverse tcp' do
let(:payload) { 'linux/x86/shell_reverse_tcp' } let(:payload) { 'linux/x86/shell_reverse_tcp' }