fixed module loading bug
This commit is contained in:
@@ -1,11 +1,13 @@
|
|||||||
RSpec.describe 'BeEF Command class testing' do
|
RSpec.describe 'BeEF Command class testing' do
|
||||||
before(:each) do
|
before(:each) do
|
||||||
# Reset or re-initialise the configuration to a default state
|
# Reset or re-initialise the configuration to a default state
|
||||||
@config_instance = BeEF::Core::Configuration.instance
|
# @config_instance = BeEF::Core::Configuration.instance
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'should return a beef configuration variable' do
|
it 'should return a beef configuration variable' do
|
||||||
BeEF::Modules.load
|
expect {
|
||||||
|
BeEF::Modules.load if BeEF::Core::Configuration.instance.get('beef.module').nil?
|
||||||
|
}.to_not raise_error
|
||||||
command_mock = BeEF::Core::Command.new('test_get_variable')
|
command_mock = BeEF::Core::Command.new('test_get_variable')
|
||||||
expect(command_mock.config.beef_host).to eq('0.0.0.0')
|
expect(command_mock.config.beef_host).to eq('0.0.0.0')
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ RSpec.describe 'BeEF Modules' do
|
|||||||
|
|
||||||
it 'loaded successfully' do
|
it 'loaded successfully' do
|
||||||
expect {
|
expect {
|
||||||
BeEF::Modules.load
|
BeEF::Modules.load if BeEF::Core::Configuration.instance.get('beef.module').nil?
|
||||||
}.to_not raise_error
|
}.to_not raise_error
|
||||||
|
|
||||||
modules = BeEF::Core::Configuration.instance.get('beef.module').select do |k,v|
|
modules = BeEF::Core::Configuration.instance.get('beef.module').select do |k,v|
|
||||||
|
|||||||
Reference in New Issue
Block a user