Sha256: 16b6b09bcd6dd96374fcf70184671adcfb7cf8ef2bb8b3dda5d6a9ddd274a316

Contents?: true

Size: 766 Bytes

Versions: 18

Compression:

Stored size: 766 Bytes

Contents

shared_examples_for 'Mdm::Module::Detail supports stance with mtype' do |mtype|
  context "with #{mtype.inspect}" do
    # define as a let so that lets from outer context can access option to set detail.
    let(:mtype) do
      mtype
    end

    it 'should return true for supports_stance?' do
      expect(detail.supports_stance?).to eq(true)
    end

    context 'with nil stance' do
      let(:stance) do
        nil
      end

      it { is_expected.to be_invalid }
    end

    context "with 'aggresive' stance" do
      let(:stance) do
        'aggressive'
      end

      it { is_expected.to be_valid }
    end

    context "with 'passive' stance" do
      let(:stance) do
        'passive'
      end

      it { is_expected.to be_valid }
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
metasploit_data_models-1.2.10 spec/support/shared/examples/mdm/module/detail/supports_stance_with_mtype.rb
metasploit_data_models-1.2.9 spec/support/shared/examples/mdm/module/detail/supports_stance_with_mtype.rb
metasploit_data_models-1.2.8 spec/support/shared/examples/mdm/module/detail/supports_stance_with_mtype.rb
metasploit_data_models-1.2.7 spec/support/shared/examples/mdm/module/detail/supports_stance_with_mtype.rb
metasploit_data_models-1.2.6 spec/support/shared/examples/mdm/module/detail/supports_stance_with_mtype.rb
metasploit_data_models-1.2.5 spec/support/shared/examples/mdm/module/detail/supports_stance_with_mtype.rb
metasploit_data_models-1.2.4 spec/support/shared/examples/mdm/module/detail/supports_stance_with_mtype.rb
metasploit_data_models-1.2.3 spec/support/shared/examples/mdm/module/detail/supports_stance_with_mtype.rb
metasploit_data_models-1.2.2 spec/support/shared/examples/mdm/module/detail/supports_stance_with_mtype.rb
metasploit_data_models-0.24.4 spec/support/shared/examples/mdm/module/detail/supports_stance_with_mtype.rb
metasploit_data_models-1.2.1 spec/support/shared/examples/mdm/module/detail/supports_stance_with_mtype.rb
metasploit_data_models-1.2.0 spec/support/shared/examples/mdm/module/detail/supports_stance_with_mtype.rb
metasploit_data_models-1.1.0 spec/support/shared/examples/mdm/module/detail/supports_stance_with_mtype.rb
metasploit_data_models-1.0.1 spec/support/shared/examples/mdm/module/detail/supports_stance_with_mtype.rb
metasploit_data_models-1.0.0 spec/support/shared/examples/mdm/module/detail/supports_stance_with_mtype.rb
metasploit_data_models-0.24.3 spec/support/shared/examples/mdm/module/detail/supports_stance_with_mtype.rb
metasploit_data_models-0.24.2 spec/support/shared/examples/mdm/module/detail/supports_stance_with_mtype.rb
metasploit_data_models-0.24.1.pre.rspec.pre.3.pre.1 spec/support/shared/examples/mdm/module/detail/supports_stance_with_mtype.rb