Sha256: bcd98f673ef259fec557feeef269487e1d8103d0a061ebb43817a3ee9b51ef9e

Contents?: true

Size: 355 Bytes

Versions: 18

Compression:

Stored size: 355 Bytes

Contents

FactoryGirl.define do

  factory :syllabus, class: Gaku::Syllabus do
    name { Faker::Name.name }
    code '12345'
    description 'Short description'
    credits 'Huge Credits'

    factory :invalid_syllabus do
      code nil
    end
  end

  trait :with_exam do
    after(:create) do |syllabus|
      syllabus.exams << create(:exam)
    end
  end

end

Version data entries

18 entries across 18 versions & 2 rubygems

Version Path
gaku-0.2.4 core/lib/gaku/testing/factories/syllabus_factory.rb
gaku_core-0.2.4 lib/gaku/testing/factories/syllabus_factory.rb
gaku-0.2.3 core/lib/gaku/testing/factories/syllabus_factory.rb
gaku_core-0.2.3 lib/gaku/testing/factories/syllabus_factory.rb
gaku-0.2.2 core/lib/gaku/testing/factories/syllabus_factory.rb
gaku_core-0.2.2 lib/gaku/testing/factories/syllabus_factory.rb
gaku-0.2.1 core/lib/gaku/testing/factories/syllabus_factory.rb
gaku_core-0.2.1 lib/gaku/testing/factories/syllabus_factory.rb
gaku-0.2.0 core/lib/gaku/testing/factories/syllabus_factory.rb
gaku_core-0.2.0 lib/gaku/testing/factories/syllabus_factory.rb
gaku-0.1.1 core/lib/gaku/testing/factories/syllabus_factory.rb
gaku_core-0.1.1 lib/gaku/testing/factories/syllabus_factory.rb
gaku-0.1.0 core/lib/gaku/testing/factories/syllabus_factory.rb
gaku_core-0.1.0 lib/gaku/testing/factories/syllabus_factory.rb
gaku_core-0.0.3 lib/gaku/testing/factories/syllabus_factory.rb
gaku-0.0.3 core/lib/gaku/testing/factories/syllabus_factory.rb
gaku-0.0.2 core/lib/gaku/testing/factories/syllabus_factory.rb
gaku_core-0.0.2 lib/gaku/testing/factories/syllabus_factory.rb