Sha256: 05e6da36bfbc2ca6b80e0bed2bb657e6abcc273df2eea319226104f7e6fb6f95

Contents?: true

Size: 958 Bytes

Versions: 31

Compression:

Stored size: 958 Bytes

Contents

shared_examples_for 'Metasploit::Model::Translation' do |options={}|
  options.assert_valid_keys(:metasploit_model_ancestor)

  metasploit_model_ancestor = options.fetch(:metasploit_model_ancestor)

  it 'should include Metasploit::Model::Translation' do
    base_class.should include Metasploit::Model::Translation
  end

  unless metasploit_model_ancestor.is_a? Class
    context metasploit_model_ancestor do
      context "dependencies" do
        subject(:dependencies) do
          metasploit_model_ancestor.instance_variable_get :@_dependencies
        end

        it { should include Metasploit::Model::Translation }
      end
    end
  end

  context 'i18n_scope' do
    subject(:i18n_scope) do
      base_class.i18n_scope
    end

    it { should == 'metasploit.model' }
  end

  context 'lookup_ancestors' do
    subject(:lookup_ancestors) do
      base_class.lookup_ancestors
    end

    it { should include metasploit_model_ancestor }
  end
end

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
metasploit-model-0.25.3 spec/support/shared/examples/metasploit/model/translation.rb
metasploit-model-0.25.3-java spec/support/shared/examples/metasploit/model/translation.rb
metasploit-model-0.25.2 spec/support/shared/examples/metasploit/model/translation.rb
metasploit-model-0.25.2-java spec/support/shared/examples/metasploit/model/translation.rb
metasploit-model-0.25.1 spec/support/shared/examples/metasploit/model/translation.rb
metasploit-model-0.25.1-java spec/support/shared/examples/metasploit/model/translation.rb
metasploit-model-0.25.1.pre.metasploit.pre.model.pre.search.pre.operator.pre.and.pre.operation.pre.groups-java spec/support/shared/examples/metasploit/model/translation.rb
metasploit-model-0.25.1.pre.metasploit.pre.model.pre.search.pre.operator.pre.and.pre.operation.pre.groups spec/support/shared/examples/metasploit/model/translation.rb
metasploit-model-0.24.1-java spec/support/shared/examples/metasploit/model/translation.rb
metasploit-model-0.24.1 spec/support/shared/examples/metasploit/model/translation.rb
metasploit-model-0.24.1.pre.semantic.pre.versioning.pre.2.pre.0 spec/support/shared/examples/metasploit/model/translation.rb