CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
rapid7

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.

GitHub Repository: rapid7/metasploit-framework
Path: blob/master/spec/acceptance_spec_helper.rb
Views: 11619
1
# spec_helper for running Meterpreter acceptance tests
2
require 'allure_config'
3
require 'spec_helper'
4
require 'test_prof/recipes/rspec/let_it_be'
5
6
acceptance_support_glob = File.expand_path(File.join(File.dirname(__FILE__), 'support', 'acceptance', '**', '*.rb'))
7
shared_contexts_glob = File.expand_path(File.join(File.dirname(__FILE__), 'support', 'shared', 'contexts', '**', '*.rb'))
8
Dir[acceptance_support_glob, shared_contexts_glob].each do |f|
9
require f
10
end
11
12
class MetasploitTransactionAdapter
13
# before_all adapters must implement two methods:
14
# - begin_transaction
15
# - rollback_transaction
16
def begin_transaction
17
# noop
18
end
19
20
def rollback_transaction
21
# noop
22
end
23
end
24
25
RSpec.configure do |config|
26
TestProf::BeforeAll.adapter = MetasploitTransactionAdapter.new
27
end
28
29