mirror of
https://github.com/DatabaseCleaner/database_cleaner
synced 2023-03-27 23:22:03 -04:00
Add Minitest example
This commit is contained in:
parent
205331686d
commit
53ebc8d88f
1 changed files with 16 additions and 0 deletions
|
@ -80,6 +80,22 @@ strategy the remaining time. To accomplish this you can say:
|
|||
# then make the DatabaseCleaner.start and DatabaseCleaner.clean calls appropriately
|
||||
</pre>
|
||||
|
||||
h3. Minitest Example
|
||||
|
||||
<pre>
|
||||
DatabaseCleaner.strategy = :transaction
|
||||
|
||||
class MiniTest::Spec
|
||||
before :each do
|
||||
DatabaseCleaner.clean
|
||||
end
|
||||
|
||||
after :each do
|
||||
DatabaseCleaner.clean
|
||||
end
|
||||
end
|
||||
</pre>
|
||||
|
||||
h3. RSpec Example
|
||||
|
||||
<pre>
|
||||
|
|
Loading…
Reference in a new issue