Sha256: 2ec26996c5e666251258352388c91e2d9d6f5cb3338a483ee34a86e4bfba2266

Contents?: true

Size: 952 Bytes

Versions: 31

Compression:

Stored size: 952 Bytes

Contents

Metasploit::Model::Spec.shared_examples_for 'Module::Platform' do
  context 'factories' do
    context module_platform_factory.to_s do
      subject(module_platform_factory) do
        FactoryGirl.build(module_platform_factory)
      end

      it { should be_valid }

      context '#module_instance' do
        subject(:module_instance) do
          send(module_platform_factory).module_instance
        end

        it { should be_valid }

        context '#module_platforms' do
          subject(:module_platforms) do
            module_instance.module_platforms
          end

          its(:length) { should == 1 }

          it "should include #{module_platform_factory}" do
            expect(module_platforms).to include send(module_platform_factory)
          end
        end
      end
    end
  end

  context 'validations' do
    it { should validate_presence_of :module_instance }
    it { should validate_presence_of :platform }
  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/module/platform.rb
metasploit-model-0.28.0-java spec/support/shared/examples/metasploit/model/module/platform.rb
metasploit-model-0.28.0.pre.engine.pre.requires spec/support/shared/examples/metasploit/model/module/platform.rb
metasploit-model-0.27.4 spec/support/shared/examples/metasploit/model/module/platform.rb
metasploit-model-0.27.4-java spec/support/shared/examples/metasploit/model/module/platform.rb
metasploit-model-0.27.3 spec/support/shared/examples/metasploit/model/module/platform.rb
metasploit-model-0.27.3-java spec/support/shared/examples/metasploit/model/module/platform.rb
metasploit-model-0.27.2 spec/support/shared/examples/metasploit/model/module/platform.rb
metasploit-model-0.27.2-java spec/support/shared/examples/metasploit/model/module/platform.rb
metasploit-model-0.27.1 spec/support/shared/examples/metasploit/model/module/platform.rb
metasploit-model-0.27.1-java spec/support/shared/examples/metasploit/model/module/platform.rb
metasploit-model-0.27.0 spec/support/shared/examples/metasploit/model/module/platform.rb
metasploit-model-0.27.0-java spec/support/shared/examples/metasploit/model/module/platform.rb
metasploit-model-0.27.0.pre.dep.pre.railties spec/support/shared/examples/metasploit/model/module/platform.rb
metasploit-model-0.26.1-java spec/support/shared/examples/metasploit/model/module/platform.rb
metasploit-model-0.26.1 spec/support/shared/examples/metasploit/model/module/platform.rb
metasploit-model-0.25.7 spec/support/shared/examples/metasploit/model/module/platform.rb
metasploit-model-0.25.7-java spec/support/shared/examples/metasploit/model/module/platform.rb
metasploit-model-0.25.6 spec/support/shared/examples/metasploit/model/module/platform.rb
metasploit-model-0.25.6-java spec/support/shared/examples/metasploit/model/module/platform.rb