Sha256: 00d05de2764273e01c1e94268a97890755b32c0a5b160d4564a83bc461dba465

Contents?: true

Size: 632 Bytes

Versions: 75

Compression:

Stored size: 632 Bytes

Contents

FactoryGirl.define do
  factory :content_element, class: Pulitzer::ContentElement do
    sequence(:label)  { |n| "Slide 1 content element #{n}" }
    body              { "I pledge my life and honor to the Night's Watch, for this night and all the nights to come" }
    association :content_element_type

    trait :video do
      body { "https://www.youtube.com/watch?v=yLisM2KPDIA" }
      association :content_element_type, :video
    end

    trait :image do
      image { Rack::Test::UploadedFile.new(File.join(Dir.pwd, "spec/support/files/sam_and_snow.jpg")) }
      association :content_element_type, :image
    end
  end
end

Version data entries

75 entries across 75 versions & 1 rubygems

Version Path
pulitzer-0.5.6 spec/factories/content_element.rb
pulitzer-0.5.5 spec/factories/content_element.rb
pulitzer-0.5.4 spec/factories/content_element.rb
pulitzer-0.5.3 spec/factories/content_element.rb
pulitzer-0.5.2 spec/factories/content_element.rb
pulitzer-0.5.1 spec/factories/content_element.rb
pulitzer-0.5.0 spec/factories/content_element.rb
pulitzer-0.4.16 spec/factories/content_element.rb
pulitzer-0.4.15 spec/factories/content_element.rb
pulitzer-0.4.14 spec/factories/content_element.rb
pulitzer-0.4.13 spec/factories/content_element.rb
pulitzer-0.4.12 spec/factories/content_element.rb
pulitzer-0.4.11 spec/factories/content_element.rb
pulitzer-0.4.10 spec/factories/content_element.rb
pulitzer-0.4.9 spec/factories/content_element.rb