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.1.1 spec/factories/drugs/drug.rb
renalware-core-2.1.0 spec/factories/drugs/drug.rb
renalware-core-2.0.167 spec/factories/drugs/drug.rb
renalware-core-2.0.166 spec/factories/drugs/drug.rb
renalware-core-2.0.165 spec/factories/drugs/drug.rb
renalware-core-2.0.164 spec/factories/drugs/drug.rb
renalware-core-2.0.163 spec/factories/drugs/drug.rb
renalware-core-2.0.162 spec/factories/drugs/drug.rb
renalware-core-2.0.161 spec/factories/drugs/drug.rb
renalware-core-2.0.160 spec/factories/drugs/drug.rb
renalware-core-2.0.159 spec/factories/drugs/drug.rb
renalware-core-2.0.158 spec/factories/drugs/drug.rb
renalware-core-2.0.157 spec/factories/drugs/drug.rb
renalware-core-2.0.156 spec/factories/drugs/drug.rb
renalware-core-2.0.155 spec/factories/drugs/drug.rb
renalware-core-2.0.153 spec/factories/drugs/drug.rb
renalware-core-2.0.152 spec/factories/drugs/drug.rb
renalware-core-2.0.151 spec/factories/drugs/drug.rb
renalware-core-2.0.149 spec/factories/drugs/drug.rb
renalware-core-2.0.148 spec/factories/drugs/drug.rb