Sha256: 9783850aea2b8e199e23d8865aac8dc14aebfa4addaf60ea27e5ae775db10e44
Contents?: true
Size: 1.08 KB
Versions: 1
Compression:
Stored size: 1.08 KB
Contents
require_relative '../../../spec_helper' describe Arachni::Component::Options::URL do before( :all ) do @opt = Arachni::Component::Options::URL.new( ' ') end describe '#valid?' do context 'when the value is valid' do it 'returns true' do @opt.valid?( 'http://localhost' ).should be_true end end context 'when the value is not valid' do it 'returns false' do @opt.valid?( 'http://localhost22' ).should be_false @opt.valid?( 'localhost' ).should be_false @opt.valid?( 11 ).should be_false @opt.valid?( '#$#$c3c43' ).should be_false @opt.valid?( true ).should be_false end end context 'when required but empty' do it 'returns false' do @opt.class.new( '', [true] ).valid?( nil ).should be_false end end end describe '#type' do it 'returns the option type as a string' do @opt.type.should == 'url' end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
arachni-0.4.2 | spec/arachni/component/options/url_spec.rb |