Sha256: d4e6f646e4db97381c3e6398bf5d9e8710862511681b1cec41127c140b39404c

Contents?: true

Size: 1.54 KB

Versions: 18

Compression:

Stored size: 1.54 KB

Contents

# Configure Rails Environment
ENV['RAILS_ENV'] = 'test'

require 'rubygems'
require 'bundler'
Bundler.setup(:default, :test)

# Require simplecov before loading ..dummy/config/environment.rb because it will cause metasploit_data_models/lib to
# be loaded, which would result in Coverage not recording hits for any of the files.
require 'simplecov'
require 'coveralls'

SimpleCov.formatter = Coveralls::SimpleCov::Formatter

require File.expand_path('../dummy/config/environment.rb',  __FILE__)
require 'rspec/rails'
require 'rspec/autorun'

# full backtrace in logs so its easier to trace errors
Rails.backtrace_cleaner.remove_silencers!

# Requires supporting ruby files with custom matchers and macros, etc,
# in spec/support/ and its subdirectories.
support_glob = Metasploit::Model.root.join('spec', 'support', '**', '*.rb')

Dir.glob(support_glob) do |path|
  require path
end

RSpec.configure do |config|
  config.before(:suite) do
    # this must be explicitly set here because it should always be spec/tmp for w/e project is using
    # Metasploit::Model::Spec to handle file system clean up.
    Metasploit::Model::Spec.temporary_pathname = Metasploit::Model.root.join('spec', 'tmp')
    # Clean up any left over files from a previously aborted suite
    Metasploit::Model::Spec.remove_temporary_pathname

    # catch missing translations
    I18n.exception_handler = Metasploit::Model::Spec::I18nExceptionHandler.new
  end

  config.after(:each) do
    Metasploit::Model::Spec.remove_temporary_pathname
  end

  config.mock_with :rspec
  config.order = :random
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
metasploit-model-0.27.0.pre.dep.pre.railties spec/spec_helper.rb
metasploit-model-0.26.1-java spec/spec_helper.rb
metasploit-model-0.26.1 spec/spec_helper.rb
metasploit-model-0.25.7 spec/spec_helper.rb
metasploit-model-0.25.7-java spec/spec_helper.rb
metasploit-model-0.25.6 spec/spec_helper.rb
metasploit-model-0.25.6-java spec/spec_helper.rb
metasploit-model-0.25.3 spec/spec_helper.rb
metasploit-model-0.25.3-java spec/spec_helper.rb
metasploit-model-0.25.2 spec/spec_helper.rb
metasploit-model-0.25.2-java spec/spec_helper.rb
metasploit-model-0.25.1 spec/spec_helper.rb
metasploit-model-0.25.1-java spec/spec_helper.rb
metasploit-model-0.25.1.pre.metasploit.pre.model.pre.search.pre.operator.pre.and.pre.operation.pre.groups-java spec/spec_helper.rb
metasploit-model-0.25.1.pre.metasploit.pre.model.pre.search.pre.operator.pre.and.pre.operation.pre.groups spec/spec_helper.rb
metasploit-model-0.24.1-java spec/spec_helper.rb
metasploit-model-0.24.1 spec/spec_helper.rb
metasploit-model-0.24.1.pre.semantic.pre.versioning.pre.2.pre.0 spec/spec_helper.rb