database_cleaner/adapters/database_cleaner-mongoid/README.md

58 lines
1.3 KiB
Markdown
Raw Normal View History

2019-05-20 16:03:59 -06:00
# Database Cleaner Adapter for Mongoid
2019-05-20 16:03:59 -06:00
[![Build Status](https://travis-ci.org/DatabaseCleaner/database_cleaner-mongoid.svg?branch=master)](https://travis-ci.org/DatabaseCleaner/database_cleaner-mongoid)
[![Code Climate](https://codeclimate.com/github/DatabaseCleaner/database_cleaner-mongoid/badges/gpa.svg)](https://codeclimate.com/github/DatabaseCleaner/database_cleaner-mongoid)
2019-05-20 16:03:59 -06:00
Clean your Mongoid databases with Database Cleaner.
2019-05-20 16:03:59 -06:00
See https://github.com/DatabaseCleaner/database_cleaner for more information.
2019-05-20 16:03:59 -06:00
## Installation
```ruby
2019-05-20 16:03:59 -06:00
# Gemfile
group :test do
gem 'database_cleaner-mongoid'
end
```
## Supported Strategies
<table>
<tbody>
<tr>
<th>Truncation</th>
<th>Transaction</th>
<th>Deletion</th>
</tr>
<tr>
<td> <b>Yes</b></td>
<td> No</td>
<td> No</td>
</tr>
</tbody>
</table>
(Default strategy is denoted in bold)
2019-05-20 16:03:59 -06:00
## Configuration options
<table>
<tbody>
<tr>
<th>ORM</th>
<th>How to access</th>
<th>Notes</th>
</tr>
<tr>
<td> Mongoid</td>
<td> <code>DatabaseCleaner[:mongoid]</code></td>
<td> Multiple databases supported for Mongoid 3. Specify <code>DatabaseCleaner[:mongoid, {:connection =&gt; :db_name}]</code> </td>
</tr>
</tbody>
</table>
2019-05-20 16:03:59 -06:00
## COPYRIGHT
2019-05-20 16:03:59 -06:00
See [LICENSE] for details.