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.127 spec/factories/drugs/drug.rb
renalware-core-2.0.126 spec/factories/drugs/drug.rb
renalware-core-2.0.125 spec/factories/drugs/drug.rb
renalware-core-2.0.124 spec/factories/drugs/drug.rb
renalware-core-2.0.123 spec/factories/drugs/drug.rb
renalware-core-2.0.121 spec/factories/drugs/drug.rb
renalware-core-2.0.120 spec/factories/drugs/drug.rb
renalware-core-2.0.119 spec/factories/drugs/drug.rb
renalware-core-2.0.118 spec/factories/drugs/drug.rb
renalware-core-2.0.117 spec/factories/drugs/drug.rb
renalware-core-2.0.116 spec/factories/drugs/drug.rb
renalware-core-2.0.115 spec/factories/drugs/drug.rb
renalware-core-2.0.113 spec/factories/drugs/drug.rb
renalware-core-2.0.112 spec/factories/drugs/drug.rb
renalware-core-2.0.111 spec/factories/drugs/drug.rb
renalware-core-2.0.110 spec/factories/drugs/drug.rb
renalware-core-2.0.109 spec/factories/drugs/drug.rb
renalware-core-2.0.108 spec/factories/drugs/drug.rb
renalware-core-2.0.106 spec/factories/drugs/drug.rb
renalware-core-2.0.105 spec/factories/drugs/drug.rb