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.84 spec/factories/drugs/drug.rb
renalware-core-2.0.83 spec/factories/drugs/drug.rb
renalware-core-2.0.82 spec/factories/drugs/drug.rb
renalware-core-2.0.81 spec/factories/drugs/drug.rb
renalware-core-2.0.80 spec/factories/drugs/drug.rb
renalware-core-2.0.79 spec/factories/drugs/drug.rb
renalware-core-2.0.78 spec/factories/drugs/drug.rb
renalware-core-2.0.77 spec/factories/drugs/drug.rb
renalware-core-2.0.76 spec/factories/drugs/drug.rb
renalware-core-2.0.75 spec/factories/drugs/drug.rb
renalware-core-2.0.74 spec/factories/drugs/drug.rb
renalware-core-2.0.73 spec/factories/drugs/drug.rb
renalware-core-2.0.72 spec/factories/drugs/drug.rb