Add rpsec int_assignments_spec
parent
87d0bf1dc4
commit
e733e3b62c
|
@ -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
|
Loading…
Reference in New Issue