Sha256: f137c800b8a54fdea965005217c9def2d5f44cea4d17595ef9741aa2344fbc6b
Contents?: true
Size: 909 Bytes
Versions: 2
Compression:
Stored size: 909 Bytes
Contents
require 'pwm' describe Pwm do context 'The default set of characters' do it 'includes all upper-case letters except I and O' do (('A'..'Z').to_a - ['I', 'O']).each do |letter| Pwm.characters.should include(letter) end end it 'includes all lower-case letters except l' do (('a'..'z').to_a - ['l']).each do |letter| Pwm.characters.should include(letter) end end it 'includes all digits 2 through 9' do ('2'..'9').each do |letter| Pwm.characters.should include(letter) end end end context 'The password method' do context 'when given a length' do it 'generates a password of that length' do Pwm.password(8).length.should == 8 end end context 'when not given a length' do it 'generates a 16-character password' do Pwm.password.length.should == 16 end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
pwm-1.0.3 | spec/pwm_spec.rb |
pwm-1.0.2 | spec/pwm_spec.rb |