Sha256: 2245ef6af79bf5db6401579db23140d50a17f6e8b277724c570acc4fe05cd875

Contents?: true

Size: 772 Bytes

Versions: 50

Compression:

Stored size: 772 Bytes

Contents

RSpec.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

50 entries across 50 versions & 2 rubygems

Version Path
wg-metasploit_data_models-4.1.4.02 spec/support/shared/examples/mdm/module/detail/supports_stance_with_mtype.rb
metasploit_data_models-6.0.5 spec/support/shared/examples/mdm/module/detail/supports_stance_with_mtype.rb
metasploit_data_models-6.0.4 spec/support/shared/examples/mdm/module/detail/supports_stance_with_mtype.rb
metasploit_data_models-6.0.3 spec/support/shared/examples/mdm/module/detail/supports_stance_with_mtype.rb
metasploit_data_models-6.0.2 spec/support/shared/examples/mdm/module/detail/supports_stance_with_mtype.rb
metasploit_data_models-6.0.1 spec/support/shared/examples/mdm/module/detail/supports_stance_with_mtype.rb
metasploit_data_models-6.0.0 spec/support/shared/examples/mdm/module/detail/supports_stance_with_mtype.rb
metasploit_data_models-5.0.6 spec/support/shared/examples/mdm/module/detail/supports_stance_with_mtype.rb
metasploit_data_models-5.0.5 spec/support/shared/examples/mdm/module/detail/supports_stance_with_mtype.rb
metasploit_data_models-5.0.4 spec/support/shared/examples/mdm/module/detail/supports_stance_with_mtype.rb
metasploit_data_models-5.0.3 spec/support/shared/examples/mdm/module/detail/supports_stance_with_mtype.rb
metasploit_data_models-5.0.2 spec/support/shared/examples/mdm/module/detail/supports_stance_with_mtype.rb
metasploit_data_models-5.0.1 spec/support/shared/examples/mdm/module/detail/supports_stance_with_mtype.rb
metasploit_data_models-5.0.0 spec/support/shared/examples/mdm/module/detail/supports_stance_with_mtype.rb
metasploit_data_models-4.1.4 spec/support/shared/examples/mdm/module/detail/supports_stance_with_mtype.rb
metasploit_data_models-4.1.3 spec/support/shared/examples/mdm/module/detail/supports_stance_with_mtype.rb
metasploit_data_models-4.1.2 spec/support/shared/examples/mdm/module/detail/supports_stance_with_mtype.rb
metasploit_data_models-4.1.1 spec/support/shared/examples/mdm/module/detail/supports_stance_with_mtype.rb
metasploit_data_models-4.1.0 spec/support/shared/examples/mdm/module/detail/supports_stance_with_mtype.rb
metasploit_data_models-4.0.2 spec/support/shared/examples/mdm/module/detail/supports_stance_with_mtype.rb