moar specs!

bug/bundler_fix
David Maloney 2014-06-13 17:34:16 -05:00
parent b784bea48e
commit 300baa577c
No known key found for this signature in database
GPG Key ID: DEDBA9DC3A913DB2
1 changed files with 29 additions and 1 deletions

View File

@ -12,6 +12,9 @@ describe Metasploit::Framework::JtR::Cracker do
let(:other_pot) { '/path/to/other/pot' }
let(:wordlist) { '/path/to/wordlist' }
let(:hash_path) { '/path/to/hashes' }
let(:nt_format) { 'nt' }
let(:incremental) { 'Digits5' }
let(:rules) { 'Rule34'}
describe '#binary_path' do
@ -82,10 +85,35 @@ describe Metasploit::Framework::JtR::Cracker do
expect(cracker.crack_command).to include "--pot=#{pot}"
end
it 'uses default john.pot if the user didnot supply one' do
it 'uses default john.pot if the user did not supply one' do
expect(cracker).to receive(:john_pot_file).and_return other_pot
expect(cracker.crack_command).to include "--pot=#{other_pot}"
end
it 'uses the user supplied format directive' do
cracker.format = nt_format
expect(cracker.crack_command).to include "--format=#{nt_format}"
end
it 'uses the user supplied wordlist directive' do
cracker.wordlist = wordlist
expect(cracker.crack_command).to include "--wordlist=#{wordlist}"
end
it 'uses the user supplied incremental directive' do
cracker.incremental = incremental
expect(cracker.crack_command).to include "--incremental=#{incremental}"
end
it 'uses the user supplied rules directive' do
cracker.rules = rules
expect(cracker.crack_command).to include "--rules=#{rules}"
end
it 'puts the path to the has file at the end' do
cracker.hash_path = hash_path
expect(cracker.crack_command.last).to eq hash_path
end
end
end