add string_assignments_spec
parent
066843bb6c
commit
0d55412e80
|
@ -0,0 +1,22 @@
|
|||
require 'metasploit/framework/obfuscation/crandomizer/code_factory'
|
||||
|
||||
RSpec.describe Metasploit::Framework::Obfuscation::CRandomizer::CodeFactory::StringAssignments do
|
||||
|
||||
subject(:stringassignments) do
|
||||
described_class.new
|
||||
end
|
||||
|
||||
describe '#stub' do
|
||||
it 'is a string' do
|
||||
expect(subject.send(:stub).class).to be(String)
|
||||
end
|
||||
|
||||
it 'assigns a string' do
|
||||
expect(subject.stub).to match(/const char\* .+ = ".+"/)
|
||||
end
|
||||
|
||||
it 'has a stub() function' do
|
||||
expect(subject.send(:stub)).to match(/void stub()/)
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue