Sha256: b300ed06ce67dedf69b9fba964c0cc2554d1691ba961d2b316cb7da60961e47b

Contents?: true

Size: 660 Bytes

Versions: 22

Compression:

Stored size: 660 Bytes

Contents

FactoryGirl.define do
  factory :metasploit_credential_public,
          class: Metasploit::Credential::Username do
    transient do
      public_factory { [
        :metasploit_credential_username,
        :metasploit_credential_blank_username
      ].sample
      }

      username {
        if public_factory == :metasploit_credential_username
          generate :metasploit_credential_public_username
        else
          ""
        end
      }
    end

    initialize_with { FactoryGirl.build(public_factory, username: username) }
  end

  sequence :metasploit_credential_public_username do |n|
    "metasploit_credential_public_username#{n}"
  end

end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
metasploit-credential-2.0.14 spec/factories/metasploit/credential/publics.rb
metasploit-credential-2.0.13 spec/factories/metasploit/credential/publics.rb
metasploit-credential-2.0.12 spec/factories/metasploit/credential/publics.rb
metasploit-credential-2.0.11 spec/factories/metasploit/credential/publics.rb
metasploit-credential-2.0.10 spec/factories/metasploit/credential/publics.rb
metasploit-credential-2.0.9 spec/factories/metasploit/credential/publics.rb
metasploit-credential-2.0.8 spec/factories/metasploit/credential/publics.rb
metasploit-credential-2.0.7 spec/factories/metasploit/credential/publics.rb
metasploit-credential-2.0.6 spec/factories/metasploit/credential/publics.rb
metasploit-credential-2.0.5 spec/factories/metasploit/credential/publics.rb
metasploit-credential-2.0.4 spec/factories/metasploit/credential/publics.rb
metasploit-credential-2.0.3 spec/factories/metasploit/credential/publics.rb
metasploit-credential-2.0.2 spec/factories/metasploit/credential/publics.rb
metasploit-credential-2.0.1 spec/factories/metasploit/credential/publics.rb
metasploit-credential-2.0.0 spec/factories/metasploit/credential/publics.rb
metasploit-credential-1.1.0 spec/factories/metasploit/credential/publics.rb
metasploit-credential-1.0.1 spec/factories/metasploit/credential/publics.rb
metasploit-credential-1.0.0 spec/factories/metasploit/credential/publics.rb
metasploit-credential-1.0.0.pre.rails.pre.4.0c spec/factories/metasploit/credential/publics.rb
metasploit-credential-1.0.0.pre.rails.pre.4.0b spec/factories/metasploit/credential/publics.rb