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

Ignore builtin users in cleanup

Oliver Güntherf7c059a36bb0
diff --git a/spec/support/rspec_cleanup.rb b/spec/support/rspec_cleanup.rb
index 906cecf528c..034e5ebc4df 100644
--- a/spec/support/rspec_cleanup.rb
+++ b/spec/support/rspec_cleanup.rb
@@ -17,11 +17,11 @@ RSpec.configure do |config|
# We don't want this to be reported on CI as it breaks the build
unless ENV['CI']
config.append_after(:suite) do
- [User, Project, WorkPackage].each do |cls|
+ [User.not_builtin, Project, WorkPackage].each do |cls|
next if cls.count == 0
raise <<-EOS
- Your specs left a #{cls} in the DB
+ Your specs left #{cls.count} #{cls.model_name.plural} in the DB
Did you use before(:all) instead of before
or forget to kill the instances in a after(:all)?
EOS