From 64a870aac09a18a73dd07e6026144d54a5a700bb Mon Sep 17 00:00:00 2001 From: Luke Imhoff Date: Wed, 21 Oct 2015 08:02:09 -0500 Subject: [PATCH] Fix not implemented error by using double MSP-13484 --- spec/lib/msf/core/data_store_spec.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/lib/msf/core/data_store_spec.rb b/spec/lib/msf/core/data_store_spec.rb index 587d057c28..9784c76ca3 100644 --- a/spec/lib/msf/core/data_store_spec.rb +++ b/spec/lib/msf/core/data_store_spec.rb @@ -71,9 +71,9 @@ RSpec.describe Msf::DataStore do "foo" => "bar", "fizz" => "buzz" } + ini_class = double from_file: ini_instance - ini = stub_const("Rex::Parser::Ini", Class.new) - allow(ini).to receive(:from_file).and_return(ini_instance) + stub_const("Rex::Parser::Ini", ini_class) s = described_class.new s.from_file("path")