module Workarea::Factories::Content
Public Class Methods
pdf_file()
click to toggle source
# File lib/workarea/testing/factories/content.rb, line 33 def self.pdf_file IO.read(pdf_file_path) end
pdf_file_path()
click to toggle source
# File lib/workarea/testing/factories/content.rb, line 29 def self.pdf_file_path Testing::Engine.root.join('lib', 'workarea', 'testing', 'example_document.pdf') end
Public Instance Methods
create_asset(overrides = {})
click to toggle source
# File lib/workarea/testing/factories/content.rb, line 6 def create_asset(overrides = {}) attributes = factory_defaults(:asset).merge(overrides) Workarea::Content::Asset.create!(attributes) end
create_content(overrides = {})
click to toggle source
# File lib/workarea/testing/factories/content.rb, line 11 def create_content(overrides = {}) attributes = factory_defaults(:content).merge(overrides) Workarea::Content.create!(attributes) end
create_page(overrides = {})
click to toggle source
# File lib/workarea/testing/factories/content.rb, line 16 def create_page(overrides = {}) attributes = factory_defaults(:page).merge(overrides) Workarea::Content::Page.create!(attributes) end
pdf_file()
click to toggle source
# File lib/workarea/testing/factories/content.rb, line 25 def pdf_file Factories::Content.pdf_file end
pdf_file_path()
click to toggle source
# File lib/workarea/testing/factories/content.rb, line 21 def pdf_file_path Factories::Content.pdf_file_path end