Sha256: 1e9d54e9d83261a5c54a2c0597f53b6372dc62360477e384cc80e39da3160f5e

Contents?: true

Size: 1000 Bytes

Versions: 31

Compression:

Stored size: 1000 Bytes

Contents

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

      it { should be_valid }

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

        it { should be_valid }

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

          its(:length) { should == 1 }

          it "should include #{module_architecture_factory}" do
            expect(module_architectures).to include send(module_architecture_factory)
          end
        end
      end
    end
  end

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