Skip to content

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

send stdout to log for demo_data_seeder_spec.rb

Christophe Bliardc0bb7ca367e1
diff --git a/spec/seeders/demo_data_seeder_spec.rb b/spec/seeders/demo_data_seeder_spec.rb
index 8b5f192c27e..e594cc86f4f 100644
--- a/spec/seeders/demo_data_seeder_spec.rb
+++ b/spec/seeders/demo_data_seeder_spec.rb
@@ -32,7 +32,11 @@ describe RootSeeder,
'standard edition',
with_config: { edition: 'standard' },
with_settings: { journal_aggregation_time_minutes: 0 } do
- it 'create the demo data' do
+ before do
+ allow($stdout).to receive(:puts) { |msg| Rails.logger.info(msg) }
+ end
+
+ it 'creates the demo data' do
expect { described_class.new.do_seed! }.not_to raise_error
expect(User.where(admin: true).count).to eq 1