shared_context -> RSpec.shared_context
MSP-13484 shared_context must be qualified as global patching is disabled in spec_helper.
This commit is contained in:
parent
2b02b9e081
commit
fc9ca84da5
|
@ -4,7 +4,7 @@ require 'spec_helper'
|
|||
require 'rex/proto/http/client_request'
|
||||
|
||||
|
||||
shared_context "with no evasions" do
|
||||
RSpec.shared_context "with no evasions" do
|
||||
before(:each) do
|
||||
client_request.opts['uri_dir_self_reference'] = false
|
||||
client_request.opts['uri_fake_params_start'] = false
|
||||
|
@ -17,7 +17,7 @@ shared_context "with no evasions" do
|
|||
end
|
||||
|
||||
|
||||
shared_context "with 'uri_dir_self_reference'" do
|
||||
RSpec.shared_context "with 'uri_dir_self_reference'" do
|
||||
before(:each) do
|
||||
client_request.opts['uri_dir_self_reference'] = true
|
||||
end
|
||||
|
@ -29,7 +29,7 @@ shared_context "with 'uri_dir_self_reference'" do
|
|||
end
|
||||
|
||||
|
||||
shared_context "with 'uri_dir_fake_relative'" do
|
||||
RSpec.shared_context "with 'uri_dir_fake_relative'" do
|
||||
before(:each) do
|
||||
client_request.opts['uri_dir_fake_relative'] = true
|
||||
end
|
||||
|
@ -42,7 +42,7 @@ shared_context "with 'uri_dir_fake_relative'" do
|
|||
end
|
||||
|
||||
|
||||
shared_context "with 'uri_full_url'" do
|
||||
RSpec.shared_context "with 'uri_full_url'" do
|
||||
|
||||
before(:each) do
|
||||
client_request.opts['uri_full_url'] = true
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Use in a context to clean up the constants that are created by the module loader.
|
||||
shared_context 'Metasploit::Framework::Spec::Constants cleaner' do
|
||||
RSpec.shared_context 'Metasploit::Framework::Spec::Constants cleaner' do
|
||||
after(:each) do
|
||||
Metasploit::Framework::Spec::Constants.clean
|
||||
end
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
shared_context 'Msf::DBManager' do
|
||||
RSpec.shared_context 'Msf::DBManager' do
|
||||
include_context 'Msf::Simple::Framework'
|
||||
|
||||
let(:active) do
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
shared_context 'Msf::Framework#threads cleaner' do
|
||||
RSpec.shared_context 'Msf::Framework#threads cleaner' do
|
||||
after(:each) do |example|
|
||||
unless framework.threads?
|
||||
fail RuntimeError.new(
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# -*- coding:binary -*-
|
||||
shared_context 'Msf::Modules::Error attributes' do
|
||||
RSpec.shared_context 'Msf::Modules::Error attributes' do
|
||||
let(:causal_message) do
|
||||
'rspec'
|
||||
end
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# -*- coding:binary -*-
|
||||
shared_context "Msf::Modules::Loader::Base" do
|
||||
RSpec.shared_context "Msf::Modules::Loader::Base" do
|
||||
let(:parent_path) do
|
||||
parent_pathname.to_s
|
||||
end
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
require 'msf/base/simple/framework'
|
||||
require 'metasploit/framework'
|
||||
|
||||
shared_context 'Msf::Simple::Framework' do
|
||||
RSpec.shared_context 'Msf::Simple::Framework' do
|
||||
let(:dummy_pathname) do
|
||||
Rails.root.join('spec', 'dummy')
|
||||
end
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
# )
|
||||
# }
|
||||
#
|
||||
shared_context 'Msf::Simple::Framework#modules loading' do
|
||||
RSpec.shared_context 'Msf::Simple::Framework#modules loading' do
|
||||
include_context 'Metasploit::Framework::Spec::Constants cleaner'
|
||||
include_context 'Msf::Simple::Framework'
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
shared_context 'Msf::UIDriver' do
|
||||
RSpec.shared_context 'Msf::UIDriver' do
|
||||
let(:driver) do
|
||||
double(
|
||||
'Driver',
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
# @param options [Hash{Symbol => Pathname}]
|
||||
# @option options [Pathname] :modules_pathname Pathname of `modules` directory underwhich payloads are defined on the
|
||||
# file system.
|
||||
shared_context 'untested payloads' do |options={}|
|
||||
RSpec.shared_context 'untested payloads' do |options={}|
|
||||
options.assert_valid_keys(:modules_pathname)
|
||||
|
||||
modules_pathname = options.fetch(:modules_pathname)
|
||||
|
|
Loading…
Reference in New Issue