Sha256: 9cac831fd949b00e854aecb4c5e72410d63be3f3783b3f4915aaea231859cb3a

Contents?: true

Size: 737 Bytes

Versions: 93

Compression:

Stored size: 737 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
      detail.supports_stance?.should be_true
    end

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

      it { should be_invalid }
    end

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

      it { should be_valid }
    end

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

      it { should be_valid }
    end
  end
end

Version data entries

93 entries across 93 versions & 1 rubygems

Version Path
metasploit_data_models-0.24.5 spec/support/shared/examples/mdm/module/detail/supports_stance_with_mtype.rb
metasploit_data_models-0.24.1 spec/support/shared/examples/mdm/module/detail/supports_stance_with_mtype.rb
metasploit_data_models-1.0.0.pre.rails.pre.4.0b spec/support/shared/examples/mdm/module/detail/supports_stance_with_mtype.rb
metasploit_data_models-1.0.0.pre.rails.pre.4.0a spec/support/shared/examples/mdm/module/detail/supports_stance_with_mtype.rb
metasploit_data_models-0.24.0 spec/support/shared/examples/mdm/module/detail/supports_stance_with_mtype.rb
metasploit_data_models-0.23.3.pre.autoload spec/support/shared/examples/mdm/module/detail/supports_stance_with_mtype.rb
metasploit_data_models-0.23.2 spec/support/shared/examples/mdm/module/detail/supports_stance_with_mtype.rb
metasploit_data_models-0.23.2-java spec/support/shared/examples/mdm/module/detail/supports_stance_with_mtype.rb
metasploit_data_models-0.23.1 spec/support/shared/examples/mdm/module/detail/supports_stance_with_mtype.rb
metasploit_data_models-0.23.1-java spec/support/shared/examples/mdm/module/detail/supports_stance_with_mtype.rb
metasploit_data_models-0.23.0 spec/support/shared/examples/mdm/module/detail/supports_stance_with_mtype.rb
metasploit_data_models-0.23.0-java spec/support/shared/examples/mdm/module/detail/supports_stance_with_mtype.rb
metasploit_data_models-0.22.8 spec/support/shared/examples/mdm/module/detail/supports_stance_with_mtype.rb
metasploit_data_models-0.22.8-java spec/support/shared/examples/mdm/module/detail/supports_stance_with_mtype.rb
metasploit_data_models-0.22.7 spec/support/shared/examples/mdm/module/detail/supports_stance_with_mtype.rb
metasploit_data_models-0.22.7-java spec/support/shared/examples/mdm/module/detail/supports_stance_with_mtype.rb
metasploit_data_models-0.22.6 spec/support/shared/examples/mdm/module/detail/supports_stance_with_mtype.rb
metasploit_data_models-0.22.6-java spec/support/shared/examples/mdm/module/detail/supports_stance_with_mtype.rb
metasploit_data_models-0.22.5 spec/support/shared/examples/mdm/module/detail/supports_stance_with_mtype.rb
metasploit_data_models-0.22.5-java spec/support/shared/examples/mdm/module/detail/supports_stance_with_mtype.rb