Sha256: c095871c08d59a4d261888643fd2a0ee4f10214f53024773910175be2a8d820e

Contents?: true

Size: 1.51 KB

Versions: 18

Compression:

Stored size: 1.51 KB

Contents

require 'spec_helper'

describe Metasploit::Model do
  let(:root_pathname) do
    spec_lib_metasploit_pathname = Pathname.new(__FILE__).parent
    spec_lib_pathname = spec_lib_metasploit_pathname.parent
    spec_pathname = spec_lib_pathname.parent

    spec_pathname.parent
  end

  it 'should extend Metasploit::Model::Configured' do
    described_class.singleton_class.should include Metasploit::Model::Configured
  end

  context 'configuration' do
    subject(:configuration) do
      described_class.configuration
    end

    context 'autoload' do
      subject(:autoload) do
        configuration.autoload
      end

      context 'once_paths' do
        subject(:once_paths) do
          autoload.once_paths
        end

        it { should include root_pathname.join('lib').to_path }
      end

      context 'paths' do
        subject(:paths) do
          autoload.paths
        end

        it { should include root_pathname.join('app', 'models').to_path }
        it { should include root_pathname.join('app', 'validators').to_path }
      end
    end

    context 'i18n' do
      subject(:i18n) do
        configuration.i18n
      end

      context 'paths' do
        subject(:paths) do
          i18n.paths
        end

        it { should include root_pathname.join('config', 'locales', 'en.yml').to_path }
      end
    end
  end

  context 'root' do
    subject(:root) do
      described_class.root
    end

    it 'should be top-level directory of metasploit-model project' do
      root.should == root_pathname
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
metasploit-model-0.27.0.pre.dep.pre.railties spec/lib/metasploit/model_spec.rb
metasploit-model-0.26.1-java spec/lib/metasploit/model_spec.rb
metasploit-model-0.26.1 spec/lib/metasploit/model_spec.rb
metasploit-model-0.25.7 spec/lib/metasploit/model_spec.rb
metasploit-model-0.25.7-java spec/lib/metasploit/model_spec.rb
metasploit-model-0.25.6 spec/lib/metasploit/model_spec.rb
metasploit-model-0.25.6-java spec/lib/metasploit/model_spec.rb
metasploit-model-0.25.3 spec/lib/metasploit/model_spec.rb
metasploit-model-0.25.3-java spec/lib/metasploit/model_spec.rb
metasploit-model-0.25.2 spec/lib/metasploit/model_spec.rb
metasploit-model-0.25.2-java spec/lib/metasploit/model_spec.rb
metasploit-model-0.25.1 spec/lib/metasploit/model_spec.rb
metasploit-model-0.25.1-java spec/lib/metasploit/model_spec.rb
metasploit-model-0.25.1.pre.metasploit.pre.model.pre.search.pre.operator.pre.and.pre.operation.pre.groups-java spec/lib/metasploit/model_spec.rb
metasploit-model-0.25.1.pre.metasploit.pre.model.pre.search.pre.operator.pre.and.pre.operation.pre.groups spec/lib/metasploit/model_spec.rb
metasploit-model-0.24.1-java spec/lib/metasploit/model_spec.rb
metasploit-model-0.24.1 spec/lib/metasploit/model_spec.rb
metasploit-model-0.24.1.pre.semantic.pre.versioning.pre.2.pre.0 spec/lib/metasploit/model_spec.rb