fixing tests

This commit is contained in:
Haoxi Tan
2020-01-15 14:51:04 +10:00
parent fc1b0c6da4
commit 00eaa6a661
2 changed files with 0 additions and 21 deletions

View File

@@ -25,26 +25,9 @@ RSpec.describe 'Browser details handler' do
http_hook_server = BeEF::Core::Server.instance
http_hook_server.prepare
@pids = fork do
if ENV['RAILS_ENV'] == 'test' or ENV["COVERAGE"]
require 'simplecov'
# Give our new forked process a unique command name, to prevent problems
# when merging coverage results.
puts 'starting simplecov in fork..'
SimpleCov.command_name SecureRandom.uuid
SimpleCov.start
end
BeEF::API::Registrar.instance.fire(BeEF::API::Server, 'pre_http_start', http_hook_server)
end
@pid = fork do
if ENV['RAILS_ENV'] == 'test' or ENV["COVERAGE"]
puts 'starting simplecov in fork..'
require 'simplecov'
# Give our new forked process a unique command name, to prevent problems
# when merging coverage results.
SimpleCov.command_name SecureRandom.uuid
SimpleCov.start
end
http_hook_server.start
end
# wait for server to start

View File

@@ -42,10 +42,6 @@ class BeefTest
end
def self.new_victim
if ENV['RAILS_ENV'] == 'test' or ENV["COVERAGE"]
puts 'starting simplecov in fork..'
require 'simplecov'
end
victim = Capybara::Session.new(:selenium_headless)
victim.visit(VICTIM_URL)
victim