Converted unit tests, further work required

This commit is contained in:
Ben Passmore
2019-04-17 10:48:04 +10:00
parent 4396547cdd
commit 7c5a5b4df4
52 changed files with 1293 additions and 1845 deletions

29
spec/spec_helper.rb Normal file
View File

@@ -0,0 +1,29 @@
require 'core/loader.rb'
# Notes
# We need to load vairables that 'beef' usually does for us
## config
config = BeEF::Core::Configuration.new('config.yaml')
## home_dir
$home_dir = Dir.pwd
## root_dir
$root_dir = Dir.pwd
require 'core/bootstrap.rb'
require 'rack/test'
require 'curb'
# Require supports
Dir['spec/support/*.rb'].each do |f|
require f
end
ENV['RACK_ENV'] ||= 'test'
RSpec.configure do |config|
config.disable_monkey_patching!
config.include Rack::Test::Methods
config.expect_with :rspec do |c|
c.syntax = :expect
end
end