Sha256: 4466ad7c5a4d3df7ffb8fa9123a704524a6bcf4e276d8e0579eb817a08e7cad2
Contents?: true
Size: 916 Bytes
Versions: 4
Compression:
Stored size: 916 Bytes
Contents
require_relative '../../../spec_helper' describe Arachni::Component::Options::Address do before( :all ) do @opt = Arachni::Component::Options::Address end describe '#valid?' do context 'when the value is valid' do it 'should return true' do @opt.new( '' ).valid?( 'localhost' ).should be_true end end context 'when the value is not valid' do it 'should return false' do @opt.new( '', [ true ] ).valid?( '' ).should be_false end end context 'when required but empty' do it 'should return false' do @opt.new( '', [true] ).valid?( nil ).should be_false end end end describe '#type' do it 'should return the option type as a string' do @opt.new( '' ).type.should == 'address' end end end
Version data entries
4 entries across 4 versions & 1 rubygems