Sha256: 0f5d2914e67ec42f893f8f00c4c4b1ede2d9c3c1e339b0261ca41afd4fdc3878

Contents?: true

Size: 1.37 KB

Versions: 31

Compression:

Stored size: 1.37 KB

Contents

FactoryGirl.define do
  # Used to test {Metasploit::Model::Module::Ancestor} and to ensure that traits work when used in factories.
  factory :dummy_module_ancestor,
          :class => Dummy::Module::Ancestor,
          :traits => [
              :metasploit_model_base,
              :metasploit_model_module_ancestor
          ] do
    #
    # Associations
    #

    # Dummy::Module::Path does not support save!, so need to make sure strategy is build, which will just use new
    association :parent_path, :factory => :dummy_module_path, :strategy => :build

    #
    # Child Factories
    #

    factory :non_payload_dummy_module_ancestor,
            :traits => [
                :non_payload_metasploit_model_module_ancestor
            ]

    factory :payload_dummy_module_ancestor,
            :traits => [
                :payload_metasploit_model_module_ancestor
            ] do
      factory :single_payload_dummy_module_ancestor,
              :traits => [
                  :single_payload_metasploit_model_module_ancestor
              ]

      factory :stage_payload_dummy_module_ancestor,
              :traits => [
                  :stage_payload_metasploit_model_module_ancestor
              ]

      factory :stager_payload_dummy_module_ancestor,
              :traits => [
                  :stager_payload_metasploit_model_module_ancestor
              ]
    end
  end
end

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
metasploit-model-0.28.0 spec/dummy/spec/factories/dummy/module/ancestors.rb
metasploit-model-0.28.0-java spec/dummy/spec/factories/dummy/module/ancestors.rb
metasploit-model-0.28.0.pre.engine.pre.requires spec/dummy/spec/factories/dummy/module/ancestors.rb
metasploit-model-0.27.4 spec/dummy/spec/factories/dummy/module/ancestors.rb
metasploit-model-0.27.4-java spec/dummy/spec/factories/dummy/module/ancestors.rb
metasploit-model-0.27.3 spec/dummy/spec/factories/dummy/module/ancestors.rb
metasploit-model-0.27.3-java spec/dummy/spec/factories/dummy/module/ancestors.rb
metasploit-model-0.27.2 spec/dummy/spec/factories/dummy/module/ancestors.rb
metasploit-model-0.27.2-java spec/dummy/spec/factories/dummy/module/ancestors.rb
metasploit-model-0.27.1 spec/dummy/spec/factories/dummy/module/ancestors.rb
metasploit-model-0.27.1-java spec/dummy/spec/factories/dummy/module/ancestors.rb
metasploit-model-0.27.0 spec/dummy/spec/factories/dummy/module/ancestors.rb
metasploit-model-0.27.0-java spec/dummy/spec/factories/dummy/module/ancestors.rb
metasploit-model-0.27.0.pre.dep.pre.railties spec/dummy/spec/factories/dummy/module/ancestors.rb
metasploit-model-0.26.1-java spec/dummy/spec/factories/dummy/module/ancestors.rb
metasploit-model-0.26.1 spec/dummy/spec/factories/dummy/module/ancestors.rb
metasploit-model-0.25.7 spec/dummy/spec/factories/dummy/module/ancestors.rb
metasploit-model-0.25.7-java spec/dummy/spec/factories/dummy/module/ancestors.rb
metasploit-model-0.25.6 spec/dummy/spec/factories/dummy/module/ancestors.rb
metasploit-model-0.25.6-java spec/dummy/spec/factories/dummy/module/ancestors.rb