Add rpsec int_assignments_spec

GSoC/Meterpreter_Web_Console
Wei Chen 2018-06-28 20:59:56 -05:00
parent 87d0bf1dc4
commit e733e3b62c
1 changed files with 22 additions and 0 deletions

View File

@ -0,0 +1,22 @@
require 'metasploit/framework/obfuscation/crandomizer/code_factory'
RSpec.describe Metasploit::Framework::Obfuscation::CRandomizer::CodeFactory::IntAssignments do
subject(:int_assignments) do
described_class.new
end
describe '#if_stub' do
it 'is a string' do
expect(subject.send(:stub).class).to be(String)
end
it 'has an int assignment' do
expect(subject.send(:stub)).to match(/int .+ = \d+/)
end
it 'has a stub() function' do
expect(subject.send(:stub)).to match(/void stub()/)
end
end
end