Sha256: 7a25af59edc5243551e9c02292c1724b868ca3fed6abdaad49e8fe6a0af38941

Contents?: true

Size: 379 Bytes

Versions: 91

Compression:

Stored size: 379 Bytes

Contents

FactoryBot.define do
  factory :message, class: 'Inferno::Entities::Message' do
    result

    result_id { result.id }

    sequence(:message) { |n| "MESSAGE #{n}" }

    type { Inferno::Entities::Message::TYPES.sample }

    initialize_with { new(**attributes) }

    to_create do |instance|
      Inferno::Repositories::Messages.new.create(instance.to_hash)
    end
  end
end

Version data entries

91 entries across 91 versions & 1 rubygems

Version Path
inferno_core-0.3.6 spec/factories/message.rb
inferno_core-0.3.5 spec/factories/message.rb
inferno_core-0.3.4 spec/factories/message.rb
inferno_core-0.3.3 spec/factories/message.rb
inferno_core-0.3.2 spec/factories/message.rb
inferno_core-0.3.1 spec/factories/message.rb
inferno_core-0.3.0 spec/factories/message.rb
inferno_core-0.3.0.rc1 spec/factories/message.rb
inferno_core-0.2.0 spec/factories/message.rb
inferno_core-0.2.0.rc4 spec/factories/message.rb
inferno_core-0.2.0.rc3 spec/factories/message.rb
inferno_core-0.2.0.rc2 spec/factories/message.rb
inferno_core-0.2.0.rc1 spec/factories/message.rb
inferno_core-0.1.4.pre spec/factories/message.rb
inferno_core-0.1.3 spec/factories/message.rb
inferno_core-0.1.3.pre2 spec/factories/message.rb
inferno_core-0.1.3.pre spec/factories/message.rb
inferno_core-0.1.2 spec/factories/message.rb
inferno_core-0.1.2.pre spec/factories/message.rb
inferno_core-0.1.1 spec/factories/message.rb