OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
Load FactoryBot for lookbook so we can generate preview data
Oliver Günther42f36f0c4482
diff --git a/Gemfile b/Gemfileindex 69948a4cbc2..b29d655a1f3 100644--- a/Gemfile+++ b/Gemfile@@ -210,6 +210,11 @@ gem 'view_component'# Lookbookgem 'lookbook', '~> 2.0.5'+# Require factory_bot for usage with openproject plugins testing+gem 'factory_bot', '~> 6.2.0', require: false+# require factory_bot_rails for convenience in core development+gem 'factory_bot_rails', '~> 6.2.0', require: false+gem 'turbo-rails', "~> 1.1"group :test do@@ -288,10 +293,6 @@ endgroup :development, :test dogem 'dotenv-rails'- # Require factory_bot for usage with openproject plugins testing- gem 'factory_bot', '~> 6.2.0'- # require factory_bot_rails for convenience in core development- gem 'factory_bot_rails', '~> 6.2.0'# Tracing and profiling gemsgem 'flamegraph', require: falsediff --git a/config/initializers/lookbook.rb b/config/initializers/lookbook.rbindex 1a69ce4f8a4..ce028cc203a 100644--- a/config/initializers/lookbook.rb+++ b/config/initializers/lookbook.rb@@ -1,6 +1,9 @@OpenProject::Application.configure donext unless OpenProject::Configuration.lookbook_enabled?+ require 'factory_bot'+ require 'factory_bot_rails'+# Re-define snapshot to avoid warningsYARD::Tags::Library.define_tag("Snapshot preview (unused)", :snapshot)config.lookbook.project_name = "OpenProject Lookbook"diff --git a/spec/rails_helper.rb b/spec/rails_helper.rbindex 448cb256919..959ae5fefa0 100644--- a/spec/rails_helper.rb+++ b/spec/rails_helper.rb@@ -27,6 +27,7 @@ENV['RAILS_ENV'] ||= 'test'require File.expand_path('../config/environment', __dir__)+require 'factory_bot'require 'factory_bot_rails'require 'rspec/rails'require 'shoulda/matchers'