Sha256: b81528ab8bd2159d4dfdaa250a145f2d2b5a9c149806c9c45b722f975604c45a
Contents?: true
Size: 1.1 KB
Versions: 25
Compression:
Stored size: 1.1 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 end
Version data entries
25 entries across 25 versions & 1 rubygems