Oops, $ and _ need to be in the spec.

* Repeats the random check 20 times for each spec.
bug/bundler_fix
Joe Vennix 2014-03-03 21:54:09 -06:00
parent 6c3b667152
commit a382b78f80
1 changed files with 3 additions and 3 deletions

View File

@ -13,12 +13,12 @@ describe Rex::Exploitation::JSObfu do
it { should be_a String }
it { should_not be_empty }
it 'is alphanumeric' do
expect(random_var_name).to match(/\A[a-zA-Z0-9]+\Z/)
it 'is composed of _, $, alphanumeric chars' do
20.times { expect(jsobfu.random_var_name).to match(/\A[a-zA-Z0-9$_]+\Z/) }
end
it 'does not start with a number' do
expect(random_var_name).not_to match(/\A[0-9]/)
20.times { expect(jsobfu.random_var_name).not_to match(/\A[0-9]/) }
end
context 'when a reserved word is generated' do