From 577065f68d1cef387688b7e704e11c32515b2b84 Mon Sep 17 00:00:00 2001 From: Luke Imhoff Date: Tue, 11 Nov 2014 14:14:50 -0600 Subject: [PATCH] Update Msfcli#guess_encoder_name spec style MSP-11147 --- spec/msfcli_spec.rb | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/spec/msfcli_spec.rb b/spec/msfcli_spec.rb index a7f63a9d52..bc2444b080 100644 --- a/spec/msfcli_spec.rb +++ b/spec/msfcli_spec.rb @@ -261,11 +261,20 @@ describe Msfcli do end context "#guess_encoder_name" do - cli = Msfcli.new([]) - it "should contain a match for x86/shikata_ga_nai" do - encoder = 'x86/shikata_ga_nai' - m = cli.guess_encoder_name(encoder) - m.should eq([/encoders\/#{encoder}/]) + subject(:guess_encoder_name) { + msfcli.guess_encoder_name(encoder_reference_name) + } + + context 'with x86/shikata_ga_nai' do + let(:encoder_reference_name) { + 'x86/shikata_ga_nai' + } + + it { + is_expected.to eq( + [/encoders\/#{encoder_reference_name}/] + ) + } end end