spec/factories/scraped_sites.rb in pageflow-chart-2.1.0 vs spec/factories/scraped_sites.rb in pageflow-chart-2.2.0
- old
+ new
@@ -1,5 +1,18 @@
-FactoryBot.define do
- factory :scraped_site, class: 'Pageflow::Chart::ScrapedSite' do
- url 'MyString'
+module Pageflow
+ module Chart
+ FactoryBot.define do
+ factory :scraped_site, class: 'Pageflow::Chart::ScrapedSite' do
+ url { 'MyString' }
+
+ trait :processed do
+ state { 'processed' }
+
+ javascript_file { File.open(Engine.root.join('spec', 'fixtures', 'all.js')) }
+ stylesheet_file { File.open(Engine.root.join('spec', 'fixtures', 'all.css')) }
+ html_file { File.open(Engine.root.join('spec', 'fixtures', 'index.html')) }
+ csv_file { File.open(Engine.root.join('spec', 'fixtures', 'data.csv')) }
+ end
+ end
+ end
end
end