Sha256: 77503964b9a197350ede09e0ce50a0afdb8d5164f5d7292db95a2f255f138a4a

Contents?: true

Size: 1.42 KB

Versions: 5

Compression:

Stored size: 1.42 KB

Contents

# This file was generated by the `rspec --init` command. Conventionally, all
# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
# Require this file using `require "spec_helper.rb"` to ensure that it is only
# loaded once.
#
require_relative '../lib/arachni'
#require_relative '../lib/arachni/ui/cli/output'
require 'eventmachine'

@@root = File.dirname( File.absolute_path( __FILE__ ) ) + '/'

Dir.glob( @@root + 'shared/**/*.rb' ).each { |f| require f }

require @@root + 'helpers/misc'
Dir.glob( @@root + 'helpers/**/*.rb' ).each { |f| require f }

@@server_pids ||= []
@@servers     ||= {}
Dir.glob( File.join( @@root + 'servers/**', "*.rb" ) ) do |path|
    name = File.basename( path, '.rb' ).to_sym
    next if name == :base

    @@servers[name] = {
        port: random_port,
        path: path
    }
end

# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
RSpec.configure do |config|
    config.treat_symbols_as_metadata_keys_with_true_values = true
    config.run_all_when_everything_filtered = true
    config.color = true
    config.add_formatter :documentation

    config.before( :all ) do
        #Arachni::UI::Output.mute
        #Arachni::UI::Output.debug_on

        kill_processes
        kill_servers
        kill_em

        Arachni::Framework.reset
        reset_options
        Arachni::HTTP.reset
    end

    config.after( :suite ) do
        kill_processes
        kill_servers
    end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
arachni-0.4.2 spec/spec_helper.rb
arachni-0.4.1.3 spec/spec_helper.rb
arachni-0.4.1.2 spec/spec_helper.rb
arachni-0.4.1.1 spec/spec_helper.rb
arachni-0.4.1 spec/spec_helper.rb