Sha256: 6a2f10ad4eae4845fa528e1c1e7ae1afef75d676ce6778284d8af010cf32d7fd
Contents?: true
Size: 1.21 KB
Versions: 7
Compression:
Stored size: 1.21 KB
Contents
require 'factory_girl_rails' FactoryGirl.define do sequence :title do |n| "Foo Bar #{n}" end sequence :slug do |n| "foo-bar-#{n}" end factory :node, class: 'PushType::Node' do title 'Foo bar' slug { generate :slug } factory :published_node do status 'published' end end sequence :email do |n| "joe-#{n}@example.com" end factory :user, class: 'PushType::User' do name 'Joe Bloggs' email { generate :email } end factory :asset, class: 'PushType::Asset' do file { Rack::Test::UploadedFile.new(PushType::Core::Engine.root.join('test', 'files/image.png')) } factory :image_asset do end factory :audio_asset do file { Rack::Test::UploadedFile.new(PushType::Core::Engine.root.join('test', 'files/audio.m3u')) } end factory :video_asset do file { Rack::Test::UploadedFile.new(PushType::Core::Engine.root.join('test', 'files/video.mp4')) } end factory :document_asset do file { Rack::Test::UploadedFile.new(PushType::Core::Engine.root.join('test', 'files/document.pdf')) } end end factory :taxonomy, class: 'PushType::Taxonomy' do title { generate :title } slug { generate :slug } end end
Version data entries
7 entries across 7 versions & 1 rubygems