diff --git a/.travis.yml b/.travis.yml index aa434f4dc..937e33dfa 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,8 +3,6 @@ rvm: - 2.4.0 - 2.5.0 - 2.6.0 -env: - - "BEEF_TEST=true" notifications: email: recipients: diff --git a/Rakefile b/Rakefile index 461ca986f..1ed8fcc45 100644 --- a/Rakefile +++ b/Rakefile @@ -7,61 +7,13 @@ require 'yaml' #require 'pry-byebug' -task :default => ["quick"] - -desc "Run quick tests" -task :quick do - Rake::Task['unit'].invoke # run unit tests -end - -desc "Run all tests" -task :all do - Rake::Task['integration'].invoke # run integration tests - Rake::Task['unit'].invoke # run unit tests - Rake::Task['msf'].invoke # run msf tests -end - -desc "Run automated tests (for Jenkins)" -task :automated do - Rake::Task['xserver_start'].invoke - Rake::Task['all'].invoke - Rake::Task['xserver_stop'].invoke -end - -desc "Run integration unit tests" -task :integration => ["install"] do - Rake::Task['beef_start'].invoke - sh "export DISPLAY=:0; cd test/integration;ruby -W0 ts_integration.rb" - Rake::Task['beef_stop'].invoke -end - -desc "Run integration unit tests" -task :unit => ["install"] do - sh "cd test/unit;ruby -W0 ts_unit.rb" -end - -desc "Run MSF unit tests" -task :msf => ["install", "msf_install"] do - Rake::Task['msf_update'].invoke - Rake::Task['msf_start'].invoke - sh "cd test/thirdparty/msf/unit/;ruby -W0 ts_metasploit.rb" - Rake::Task['msf_stop'].invoke -end +task :default => ["spec"] desc 'Generate API documentation to doc/rdocs/index.html' task :rdoc do Rake::Task['rdoc:rerdoc'].invoke end -desc 'rest test examples' -task :rest_test do - Rake::Task['beef_start'].invoke - - sh 'cd test/api/; ruby -W2 1333_auth_rate.rb' - - Rake::Task['beef_stop'].invoke -end - ## RSPEC require 'rspec/core/rake_task' RSpec::Core::RakeTask.new(:spec) diff --git a/spec/beef/api/auth_rate_spec.rb b/spec/beef/api/auth_rate_spec.rb index 1bbbcbec0..e61d6c827 100644 --- a/spec/beef/api/auth_rate_spec.rb +++ b/spec/beef/api/auth_rate_spec.rb @@ -7,6 +7,8 @@ RSpec.describe 'BeEF API Rate Limit' do before(:all) do + # Note: rake spec passes --patterns which causes BeEF to pickup this argument via optparse. I can't see a better way at the moment to filter this out. Therefore ARGV=[] for this test. + ARGV = [] DataMapper.setup(:default, 'sqlite3::memory:') DataMapper.auto_migrate! @config = BeEF::Core::Configuration.instance