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.28.0 spec/support/shared/examples/metasploit/model/translation.rb
metasploit-model-0.28.0-java spec/support/shared/examples/metasploit/model/translation.rb
metasploit-model-0.28.0.pre.engine.pre.requires spec/support/shared/examples/metasploit/model/translation.rb
metasploit-model-0.27.4 spec/support/shared/examples/metasploit/model/translation.rb
metasploit-model-0.27.4-java spec/support/shared/examples/metasploit/model/translation.rb
metasploit-model-0.27.3 spec/support/shared/examples/metasploit/model/translation.rb
metasploit-model-0.27.3-java spec/support/shared/examples/metasploit/model/translation.rb
metasploit-model-0.27.2 spec/support/shared/examples/metasploit/model/translation.rb
metasploit-model-0.27.2-java spec/support/shared/examples/metasploit/model/translation.rb
metasploit-model-0.27.1 spec/support/shared/examples/metasploit/model/translation.rb
metasploit-model-0.27.1-java spec/support/shared/examples/metasploit/model/translation.rb
metasploit-model-0.27.0 spec/support/shared/examples/metasploit/model/translation.rb
metasploit-model-0.27.0-java spec/support/shared/examples/metasploit/model/translation.rb
metasploit-model-0.27.0.pre.dep.pre.railties spec/support/shared/examples/metasploit/model/translation.rb
metasploit-model-0.26.1-java spec/support/shared/examples/metasploit/model/translation.rb
metasploit-model-0.26.1 spec/support/shared/examples/metasploit/model/translation.rb
metasploit-model-0.25.7 spec/support/shared/examples/metasploit/model/translation.rb
metasploit-model-0.25.7-java spec/support/shared/examples/metasploit/model/translation.rb
metasploit-model-0.25.6 spec/support/shared/examples/metasploit/model/translation.rb
metasploit-model-0.25.6-java spec/support/shared/examples/metasploit/model/translation.rb