Sha256: dda6d18f3c1411e0f84e85971a0fddac5b3cd55ab74c20180e0858420441a7d4

Contents?: true

Size: 284 Bytes

Versions: 16

Compression:

Stored size: 284 Bytes

Contents

FactoryBot.define do
  trait :metasploit_model_base do
    to_create do |instance|
      # validate so before validation derivation occurs to mimic create for ActiveRecord.
      unless instance.valid?
        raise Metasploit::Model::Invalid.new(instance)
      end
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
metasploit-model-5.0.2 spec/factories/metasploit/model/bases.rb
metasploit-model-5.0.1 spec/factories/metasploit/model/bases.rb
metasploit-model-5.0.0 spec/factories/metasploit/model/bases.rb
metasploit-model-4.0.6 spec/factories/metasploit/model/bases.rb
metasploit-model-4.0.5 spec/factories/metasploit/model/bases.rb
metasploit-model-4.0.4 spec/factories/metasploit/model/bases.rb
metasploit-model-4.0.3 spec/factories/metasploit/model/bases.rb
metasploit-model-4.0.2 spec/factories/metasploit/model/bases.rb
metasploit-model-4.0.1 spec/factories/metasploit/model/bases.rb
metasploit-model-4.0.0 spec/factories/metasploit/model/bases.rb
metasploit-model-3.1.4 spec/factories/metasploit/model/bases.rb
metasploit-model-3.1.3 spec/factories/metasploit/model/bases.rb
metasploit-model-3.1.2 spec/factories/metasploit/model/bases.rb
metasploit-model-3.1.1 spec/factories/metasploit/model/bases.rb
metasploit-model-3.1.0 spec/factories/metasploit/model/bases.rb
metasploit-model-3.0.0 spec/factories/metasploit/model/bases.rb