Sha256: 1d5315513afbc919acd2b3ec0e779c3e396d4fe9b3fe0109db1c52a4c7c6a88e
Contents?: true
Size: 1.1 KB
Versions: 4
Compression:
Stored size: 1.1 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 'should return true' do @opt.valid?( 'http://localhost' ).should be_true end end context 'when the value is not valid' do it 'should return 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 'should return false' do @opt.class.new( '', [true] ).valid?( nil ).should be_false end end end describe '#type' do it 'should return the option type as a string' do @opt.type.should == 'url' end end end
Version data entries
4 entries across 4 versions & 1 rubygems