Sha256: d659bacdecba219ffb3c9e49c13b61e537fa55acf213f91ee00ac36b84c27d2a
Contents?: true
Size: 1.03 KB
Versions: 10
Compression:
Stored size: 1.03 KB
Contents
require 'spec_helper' describe Arachni::Component::Options::URL do include_examples 'component_option' subject { described_class.new( ' ') } describe '#normalize' do it "returns #{Arachni::URI}" do subject.value = 'http://localhost' subject.normalize.should == Arachni::URI('http://localhost') end end describe '#valid?' do context 'when the value is valid' do it 'returns true' do subject.value = 'http://localhost' subject.valid?.should be_true end end context 'when the value is not valid' do it 'returns false' do ['http://localhost22', 'localhost', 11, '#$#$c3c43', true].each do |value| subject.value = value subject.valid?.should be_false end end end end describe '#type' do it 'returns the option type as a string' do subject.type.should == :url end end end
Version data entries
10 entries across 10 versions & 1 rubygems