mirror of
https://github.com/rapid7/metasploit-framework
synced 2024-11-05 14:57:30 +01:00
Land #8234, make running specs with the database self-explanitory
This commit is contained in:
commit
e992692241
13
Rakefile
13
Rakefile
@ -9,6 +9,19 @@ require 'metasploit/framework/spec/untested_payloads'
|
||||
# the user installs with `bundle install --without db`
|
||||
Metasploit::Framework::Require.optionally_active_record_railtie
|
||||
|
||||
begin
|
||||
require 'rspec/core'
|
||||
rescue LoadError
|
||||
puts "rspec not in bundle, so can't set up spec tasks. " \
|
||||
"To run specs ensure to install the development and test groups."
|
||||
puts "Bundle currently installed '--without #{Bundler.settings.without.join(' ')}'."
|
||||
puts "To clear the without option do `bundle install --without ''` (the --without flag with an empty string) or " \
|
||||
"`rm -rf .bundle` to remove the .bundle/config manually and then `bundle install`"
|
||||
else
|
||||
require 'rspec/core/rake_task'
|
||||
RSpec::Core::RakeTask.new(spec: 'db:test:prepare')
|
||||
end
|
||||
|
||||
Metasploit::Framework::Application.load_tasks
|
||||
Metasploit::Framework::Spec::Constants.define_task
|
||||
Metasploit::Framework::Spec::Threads::Suite.define_task
|
||||
|
Loading…
Reference in New Issue
Block a user