Sha256: 03684cc97cf3a5545fcfcddb00b8e8b7d269b8836b672d3ed904e09644c50798

Contents?: true

Size: 423 Bytes

Versions: 93

Compression:

Stored size: 423 Bytes

Contents

# frozen_string_literal: true

FactoryBot.define do
  factory :drug, class: "Renalware::Drugs::Drug" do
    name { "Blue Pill" }

    trait :immunosuppressant do
      after(:create) do |instance|
        instance.drug_types << create(:drug_type, :immunosuppressant)
      end
    end

    trait :esa do
      after(:create) do |instance|
        instance.drug_types << create(:drug_type, :esa)
      end
    end
  end
end

Version data entries

93 entries across 93 versions & 1 rubygems

Version Path
renalware-core-2.0.147 spec/factories/drugs/drug.rb
renalware-core-2.0.146 spec/factories/drugs/drug.rb
renalware-core-2.0.145 spec/factories/drugs/drug.rb
renalware-core-2.0.144 spec/factories/drugs/drug.rb
renalware-core-2.0.143 spec/factories/drugs/drug.rb
renalware-core-2.0.142 spec/factories/drugs/drug.rb
renalware-core-2.0.141 spec/factories/drugs/drug.rb
renalware-core-2.0.140 spec/factories/drugs/drug.rb
renalware-core-2.0.139 spec/factories/drugs/drug.rb
renalware-core-2.0.138 spec/factories/drugs/drug.rb
renalware-core-2.0.137 spec/factories/drugs/drug.rb
renalware-core-2.0.136 spec/factories/drugs/drug.rb
renalware-core-2.0.135 spec/factories/drugs/drug.rb
renalware-core-2.0.134 spec/factories/drugs/drug.rb
renalware-core-2.0.133 spec/factories/drugs/drug.rb
renalware-core-2.0.132 spec/factories/drugs/drug.rb
renalware-core-2.0.131 spec/factories/drugs/drug.rb
renalware-core-2.0.130 spec/factories/drugs/drug.rb
renalware-core-2.0.129 spec/factories/drugs/drug.rb
renalware-core-2.0.128 spec/factories/drugs/drug.rb