From ff0391cdc705eedd49c25699d0f91c158640084f Mon Sep 17 00:00:00 2001 From: Luke Imhoff Date: Tue, 4 Nov 2014 09:40:55 -0600 Subject: [PATCH] Fix derive_module_ancestor_names MSP-11130 Wrap :reference_name in an Array since :ancestor_reference_names is expected to be an Array. --- .../shared/contexts/msf/simple/framework/modules/loading.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/spec/support/shared/contexts/msf/simple/framework/modules/loading.rb b/spec/support/shared/contexts/msf/simple/framework/modules/loading.rb index 31330edb3a..1a92bbfa6e 100644 --- a/spec/support/shared/contexts/msf/simple/framework/modules/loading.rb +++ b/spec/support/shared/contexts/msf/simple/framework/modules/loading.rb @@ -55,7 +55,9 @@ shared_context 'Msf::Simple::Framework#modules loading' do end # non-payload's single ancestor has the same reference name as the created module. - options.fetch(:reference_name) + reference_name = options.fetch(:reference_name) + + [reference_name] } end @@ -89,7 +91,7 @@ shared_context 'Msf::Simple::Framework#modules loading' do loader = loader_for_modules_path(modules_path) loaded = loader.load_module(modules_path, module_type, ancestor_reference_name) - expect(loaded).to eq(true), "#{ancestor_reference_name} failed to load from #{modules_path}" + expect(loaded).to eq(true), "#{module_type}/#{ancestor_reference_name} failed to load from #{modules_path}" end # Expects to laod `:ancestor_reference_names` of `:module_type` from `:modules_path`