DatabaseCleaner/database_cleaner
Strategies for cleaning databases in Ruby. Can be used to ensure a clean state for testing. observed · 2026-08-28
Health v2 · maintenance only
70/100
- Activity 85
- Release rhythm 35
- Longevity 100
Flags: no_releases
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-03. Adoption (stars, forks) is never an input.
- gap_med: n/a
- age_days: 6390
- days_rel: n/a
- days_push: 93
- n_releases_24m: 0
Adoption not part of the score
2965 stars · 485 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-30, confidence not recorded
A set of Ruby gems providing strategies for cleaning databases, primarily to ensure a clean state during tests. It supports multiple ORMs and databases through adapter gems such as database_cleaner-active_record, database_cleaner-mongo, and database_cleaner-redis.
Use cases
- reset database state between tests in a ruby app
- clean database tables after each rspec example
- truncate tables in a test database
- wipe redis and mongo data between test runs
- ensure a clean database state for integration tests
When to choose
- you are writing Ruby tests that touch a database and need repeatable clean state
- you use multiple ORMs (ActiveRecord, Mongoid, Redis) and want a unified cleaning API
- you need configurable strategies like truncation or transactions
When to avoid
- your app is not written in Ruby
- you only need simple transactional test fixtures already provided by your test framework
- you need production data cleanup rather than test-state management
Facets
library · maturity active
testing database testing databases developer-tools ruby database-cleaner test-fixtures orm-adapters truncation transaction-strategy
2 sources
- readme: https://github.com/DatabaseCleaner/database_cleaner · fetched 2026-08-28 · 75504311082d
- homepage: https://www.rubydoc.info/github/DatabaseCleaner/database_cleaner · fetched 2026-08-29 · 37a94e6e6297
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| DatabaseCleaner/database_cleaner | main | 70 |
For agents
markdown · JSON · MCP: product_card(name="DatabaseCleaner/database_cleaner")
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem