Sha256: d701558a1ce311d2aabfa328f0c426ec1533f60459f29640fc7b578eea97a625

Contents?: true

Size: 806 Bytes

Versions: 1

Compression:

Stored size: 806 Bytes

Contents

shared_examples_for "component" do

    before( :all ) do
        Arachni::Options.reset
        options.user_agent = 'arachni_user'
    end
    after( :all ) { framework.reset }

    def self.use_https
        before( :all ) { options.url.gsub!( 'http', 'https' ) }
    end

    def name
        self.class.description
    end

    def url
        @url ||= server_url_for( name ) + '/'
    rescue
        raise "Could not find server for '#{name}' component."
    end

    def framework
        @f ||= Arachni::Framework.new
    end

    def session
        framework.session
    end

    def http
        framework.http
    end

    def options
        framework.opts
    end

    def yaml_load( yaml )
        YAML.load yaml.gsub( '__URL__', url )
    end

    def run
        framework.run
    end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
arachni-0.4.2 spec/shared/component.rb